Convert date to milliseconds and back
Project description
toms - unix timestamp converter
Features:
- Convert unix epoch millis to UTC iso date
- Convert UTC iso date to unix epoch millis
- Read from stdin
- Replace all occurrences of unix epoch millis with iso date in text
- Print current time millis
install
pip3 install toms
examples
Convert unix epoch millis to UTC iso date
toms 1500000000000
2017-07-14T02:40:00+00:00
Convert UTC iso date to unix epoch millis
toms 2017-07-14T02:40
1500000000000
Read from stdin
echo '2019-01-01 2020-01-01T10:12' | toms
1546300800000
1577873520000
Replace all occurrences of unix epoch millis with iso date in text
echo 'text 1500000000000 text' > /tmp/some-text.txt
cat /tmp/some-text.txt | toms replace
text 2017-07-14T02:40:00+00:00 text
Print current time millis
toms now
1592335604695
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
toms-0.4.5.tar.gz
(3.0 kB
view details)
Built Distribution
toms-0.4.5-py3-none-any.whl
(4.1 kB
view details)
File details
Details for the file toms-0.4.5.tar.gz
.
File metadata
- Download URL: toms-0.4.5.tar.gz
- Upload date:
- Size: 3.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.24.0 setuptools/41.2.0 requests-toolbelt/0.9.1 tqdm/4.46.1 CPython/3.8.3
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | afc72271c99e8dcc07bf2e6e84451b65d6dafe6bfaa6a29cde688759c0d0fc6a |
|
MD5 | 65d7cfe7a04ea34a373fbf9e0ce419ae |
|
BLAKE2b-256 | d629579bc1d032309011cdef8696a3a54a655155bdeaaad2e97fda4b4868aed0 |
File details
Details for the file toms-0.4.5-py3-none-any.whl
.
File metadata
- Download URL: toms-0.4.5-py3-none-any.whl
- Upload date:
- Size: 4.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.24.0 setuptools/41.2.0 requests-toolbelt/0.9.1 tqdm/4.46.1 CPython/3.8.3
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 77006cbd7cb84a7972266280680ffb4b5dc940376a8b881e384e550242820bbb |
|
MD5 | d8654403a717c964e406e7265ad26039 |
|
BLAKE2b-256 | d94b7a70dc310541fe9bc1fa5146fcf9a0b892b82d5c7da33ba05b681f6bfc12 |