TimeStam eXtensions for Python
Project description
tsx
Time Stamp eXtensions for Python
Usage:
TS(ts: Union[int, float, str], prec: Literal["s", "ms"] = "s") TSMsec(ts: Union[int, float, str], prec: Literal["s", "ms"] = "ms")
prec - means precision of the ts
argument.
If prec=="s" - the ts
argument will be interpreted as nr of seconds since epoch,
If prec=="s" - the ts
argument will be interpreted as nr of milliseconds since epoch
Example: ts = TS(ts="1519855200.123856", prec="s")
ts==1519855200.123856 ts.as_iso == '2018-02-28T22:00:00.123856Z' ts.as_iso_tz(pytz.timezone("Europe/Bucharest"))=='2018-03-01T00:00:00.123856+02:00'
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distributions
No source distribution files available for this release.See tutorial on generating distribution archives.
Built Distribution
tsx-0.0.1-py3-none-any.whl
(15.6 kB
view hashes)