Utcnow

Latest version: v0.3.8

Safety actively analyzes 682244 Python packages for vulnerabilities to keep your Python projects secure.

Scan your dependencies

Page 2 of 3

0.3.2

* Added `Added utcnow.get_today()` / `utcnow.as_date_string(value)` which returns the date part in string format. Note that the date string that is returned does not include timezone information. The function take an optional value argument which will transform input to a UTC timezoned timestamp from which it'll extract the date.
* An optional `tz` keyword argument to `utcnow.get_today(tz=UTC)` can be used to get the current date for another timezone than UTC (which otherwise is the default behaviour). The value for `tz` should be a `datetime.tzinfo` value (such as produced from timezone libraries, for example `pytz.timezone(tz_str)` or `tzlocal.get_localzone()`) or a string describing an utcoffset, such as "+02:00" or "-06:00".

0.3.1

* Added Python 3.10 as trove classifier.
* Added test matrix to include Python 3.10.

0.3.0

* Conversion to unixtime.
* Timediff functionality to get the delta of the specified unit between two utcnow timestamps.
* `utcnow.now()` is now also available to get the current timestamp.
* Added documentation.

0.2.2

* Higher throughput, faster timestamp resolution.
* Added support for unixtime input values.

python
utcnow.get(0)
"1970-01-01T00:00:00.000000Z"

utcnow.get(time.time())
"2021-02-26T07:04:27.973312Z"

0.2.1

* Added additional functions to fetch the timestamps as strings, including `utcnow.get()`.
* Updated documentation and made it cleaner.

0.2.0

INITIAL RELEASE


pip install utcnow


_Timestamps as RFC 3339 (Date & Time on the Internet) formatted strings with conversion functinonality from other timestamp formats or for timestamps on other timezones. Additionally converts timestamps from datetime objets and other common date utilities. Follow modern practices when developing API interfaces._

Page 2 of 3

© 2024 Safety CLI Cybersecurity Inc. All Rights Reserved.