Construct a datetime from time.time() and optional time zone info.
(cls, tz=None)
| 1884 | |
| 1885 | @classmethod |
| 1886 | def now(cls, tz=None): |
| 1887 | "Construct a datetime from time.time() and optional time zone info." |
| 1888 | t = _time.time() |
| 1889 | return cls.fromtimestamp(t, tz) |
| 1890 | |
| 1891 | @classmethod |
| 1892 | def utcnow(cls): |