epochize
Pipe logs through it and every Unix timestamp (seconds, milliseconds, microseconds, nanoseconds) gets a readable date next to it. Stdlib only, Python 3.9+.
$ echo 'ts=1700000000 ms=1700000000123 build 1.2.3' | epochize
ts=1700000000 [2023-11-14 22:13:20 UTC] ms=1700000000123 [2023-11-14 22:13:20 UTC] build 1.2.3
$ tail -f app.log | epochize -r -z Europe/Warsaw # replace instead of annotate
$ epochize -z +05:30 events.json
Only numbers that fall between years 2000 and 2100 and have 10 (s), 13 (ms), 16 (us) or 19 (ns) digits are touched, so ids, versions and sizes are left alone.
Spreadsheet dates: -x/--excel treats 5-digit numbers (Excel/Sheets serial dates 1970-2099, e.g. 45000.5) as dates instead:
$ echo 'created,45000.5' | epochize -x -r
created,2023-03-15 12:00:00 UTC
Options: -x/--excel, -r/--replace, -z/--tz (utc, local, +02:00, IANA name). Exit code 2 on bad arguments or unreadable files.
Install
pip install epochize or copy epochize.py.
Support
MIT licensed. If it saves you time: https://paypal.me/RafalBaranowski
Metadata
Release files for epochize 0.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| epochize-0.1.0.tar.gz | 5.0 kB | Without provenance | Details for epochize-0.1.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| epochize-0.1.0-py3-none-any.whl | Python 3 | none | any | Details for epochize-0.1.0-py3-none-any.whl |
Total release size: 9.6 kB
Release files / epochize-0.1.0.tar.gz
| Download URL | epochize-0.1.0.tar.gz |
|---|---|
| Size | 5.0 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
09e92410e951c2bbec88be8b50a62aba610174fb4396083f695eefe10e9345ed
|
|
BLAKE2b-256 checksum How to use checksums |
415081cde1e3e80020fca36ffe5df256a58c710e6cbd1e92207c2edfd7357418
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.14.8
|
Release files / epochize-0.1.0-py3-none-any.whl
| Download URL | epochize-0.1.0-py3-none-any.whl |
|---|---|
| Size | 4.6 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
dfcf24b9a7b6ddb5da856c3104b62ccda809e3ff1bc7be23f7addee96d1cf976
|
|
BLAKE2b-256 checksum How to use checksums |
36e9f075b8f9df5b9a189dbfd5db36b33d154e785465396b8a850b1606a97f62
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.14.8
|
Security for epochize 0.1.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.