Time related utilities and helper functions.
Advance overridden time using a datetime.timedelta.
Advance overridden time by seconds.
Remove the overridden time.
Compute the difference in seconds between two date, time, or datetime objects (as a float, to microsecond resolution).
Return True if after is newer than seconds.
Return True if before is older than seconds.
Determines if time is going to happen in the next window seconds.
| Params dt: | the time |
|---|---|
| Params window: | minimum seconds to remain to consider the time not soon |
| Returns: | True if expiration is within the given duration |
Returns a iso8601 formated date from timestamp
Stringify time in ISO 8601 format
Make an rpc-safe datetime with microseconds.
Note: tzinfo is stripped, but not required for relative times.
Normalize time in arbitrary timezone to UTC naive object
Parse time from ISO 8601 format
Turn a formatted time back into a datetime.
Override utils.utcnow to return a constant time or a list thereof, one at a time.
Returns formatted utcnow.
Unmarshall a datetime dict.
Overridable version of utils.utcnow.
Timestamp version of our utcnow function.