now()
[source]
Returns a datetime
that represents the current point in time. Exactly what’s returned depends on the value of USE_TZ
:
- If
USE_TZ
isFalse
, this will be a naive datetime (i.e. a datetime without an associated timezone) that represents the current time in the system’s local timezone. - If
USE_TZ
isTrue
, this will be an aware datetime representing the current time in UTC. Note thatnow()
will always return times in UTC regardless of the value ofTIME_ZONE
; you can uselocaltime()
to convert to a time in the current time zone.
Please login to continue.