Primary
datetime.now() ⚬|Documentation|1st|20251021143107-00-⌔
datetime — Basic date and time types — Python 3 documentation#datetime.datetime.now
method
classdatetime.now(tz=None)Return the current local date and time.
If optional argument tz is
Noneor not specified, this is liketoday(), but, if possible, supplies more precision than can be gotten from going through atime.time()timestamp (for example, this may be possible on platforms supplying the Cgettimeofday()function).If tz is not
None, it must be an instance of atzinfosubclass, and the current date and time are converted to tz ’s time zone.This function is preferred over
today()andutcnow().Note: Subsequent calls to
datetime.now()may return the same instant depending on the precision of the underlying clock.Printed 2026-06-28.
(echo:: @ ᯤ)
Link to original
Secondary
• • •