Exemplo n.º 1
0
def _make_day_ends(python_datetime, tzone):
    """Makes a midnight,end-of-day DateTime pair from Python datetime and timezone ID"""

    d = DateTime(python_datetime.isoformat(), DateTimeZone.forID(tzone))
    return (d.toDateMidnight().toDateTime(), d.plusDays(1).minusSeconds(1))