Changed get_datetimes to timedelta
This commit is contained in:
@@ -107,12 +107,10 @@ def get_datetimes(seconds,tzinfo=0):
|
||||
minutes = int((second-3600.*(hours+24.*days))/60.) % 60
|
||||
sec = int(second-3600.*(hours+24.*days)-60.*minutes) % 60
|
||||
microsecond = int(1.0e6*(second-3600.*(hours+24.*days)-60.*minutes-sec))
|
||||
dt = datetime.datetime(2016,5,1,hours,minutes,sec,microsecond)
|
||||
dt = datetime.timedelta(hours=hours,minutes=minutes,
|
||||
seconds=sec,microseconds=microsecond)
|
||||
|
||||
|
||||
if tzinfo:
|
||||
dt = thetimezone.localize(dt, is_dst=True)
|
||||
# this is ugly
|
||||
# dt = dt+datetime.timedelta(hours=1)
|
||||
out.append(dt)
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user