ubelt.util_time module

This is util_time, it contains functions for handling time related code that I wish there was standard library support for. Currently there is only one function.

The timestamp() is less interesting than the previous two methods, but I have found it useful to have a function that quickly returns an iso8601 timestamp without much fuss.

Timerit is back! But it no longer lives in util_time. Instead it now lives in ubelt/timerit.py

ubelt.util_time.timestamp(method='iso8601')[source]

Make an iso8601 timestamp suitable for use in filenames

Parameters

method (str, default=’iso8601’) – type of timestamp

Example

>>> stamp = timestamp()
>>> print('stamp = {!r}'.format(stamp))
stamp = ...-...-...T...