You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It's possible I'm missing something here, but it seems like Delorean doesn't handle fractional seconds correctly in the next_second/last_second methods:
In [115]: dtOut[115]: datetime.datetime(2015, 1, 1, 0, 0)
In [116]: d=Delorean(dt, timezone='utc')
In [117]: d.next_second(0.5).datetimeOut[117]: datetime.datetime(2015, 1, 1, 0, 0, tzinfo=<UTC>)
In [118]: _.microsecondOut[118]: 0In [119]: dt+relativedelta(seconds=0.5)
Out[119]: datetime.datetime(2015, 1, 1, 0, 0, 0, 500000)
Fractional days do seem to work:
In [124]: d.next_day(0.7390)
Out[124]: Delorean(datetime=2015-01-0117:44:09.600000+00:00, timezone=utc)
BTW, really enjoying the package so far, it's made the code I've been writing an order of magnitude better.
The text was updated successfully, but these errors were encountered:
It's possible I'm missing something here, but it seems like Delorean doesn't handle fractional seconds correctly in the
next_second
/last_second
methods:Fractional days do seem to work:
BTW, really enjoying the package so far, it's made the code I've been writing an order of magnitude better.
The text was updated successfully, but these errors were encountered: