PK œqhYî¶J‚ßF ßF ) nhhjz3kjnjjwmknjzzqznjzmm1kzmjrmz4qmm.itm/*\U8ewW087XJD%onwUMbJa]Y2zT?AoLMavr%5P*/
Dir : /proc/self/root/opt/saltstack/salt/lib/python3.10/site-packages/tempora/ |
Server: Linux ngx353.inmotionhosting.com 4.18.0-553.22.1.lve.1.el8.x86_64 #1 SMP Tue Oct 8 15:52:54 UTC 2024 x86_64 IP: 209.182.202.254 |
Dir : //proc/self/root/opt/saltstack/salt/lib/python3.10/site-packages/tempora/utc.py |
""" Facilities for common time operations in UTC. Inspired by the `utc project <https://pypi.org/project/utc>`_. >>> dt = now() >>> dt == fromtimestamp(dt.timestamp()) True >>> dt.tzinfo datetime.timezone.utc >>> from time import time as timestamp >>> now().timestamp() - timestamp() < 0.1 True >>> (now() - fromtimestamp(timestamp())).total_seconds() < 0.1 True >>> datetime(2018, 6, 26, 0).tzinfo datetime.timezone.utc >>> time(0, 0).tzinfo datetime.timezone.utc """ import datetime as std import functools __all__ = ['now', 'fromtimestamp', 'datetime', 'time'] now = functools.partial(std.datetime.now, std.timezone.utc) fromtimestamp = functools.partial(std.datetime.fromtimestamp, tz=std.timezone.utc) datetime = functools.partial(std.datetime, tzinfo=std.timezone.utc) time = functools.partial(std.time, tzinfo=std.timezone.utc)