MCPcopy Create free account
hub / github.com/ipython/ipython / utc_method

Function utc_method

IPython/utils/tz.py:40–42  ·  view source on GitHub ↗
(*args, **kwargs)

Source from the content-addressed store, hash-verified

38def utc_aware(unaware):
39 """decorator for adding UTC tzinfo to datetime's utcfoo methods"""
40 def utc_method(*args, **kwargs):
41 dt = unaware(*args, **kwargs)
42 return dt.replace(tzinfo=UTC)
43 return utc_method
44
45utcfromtimestamp = utc_aware(datetime.utcfromtimestamp)

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected