Lines Matching refs:datetime
30 import datetime
147 dt = datetime.datetime.fromtimestamp(timeval, datetime.timezone.utc)
149 dt = datetime.datetime.utcfromtimestamp(timeval)
164 if dt.tzinfo is None or dt.tzinfo != datetime.timezone.utc:
203 return datetime.datetime(*dtuple[:6])
204 return datetime.datetime(*dtuple[:6],
205 tzinfo=datetime.timezone(datetime.timedelta(seconds=tz)))
349 return datetime.datetime.now(datetime.timezone.utc).astimezone()
359 delta = datetime.timedelta(seconds=localtm.tm_gmtoff)
360 tz = datetime.timezone(delta, localtm.tm_zone)
364 delta = dt - datetime.datetime(*time.gmtime(seconds)[:6])
367 if delta == datetime.timedelta(seconds=gmtoff):
368 tz = datetime.timezone(delta, time.tzname[dst])
370 tz = datetime.timezone(delta)