Skip to main content

Convert date to milliseconds and back

Project description

toms - unix timestamp converter

PyPI

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.

Files for toms, version 0.4.5
Filename, size File type Python version Upload date Hashes
Filename, size toms-0.4.5-py3-none-any.whl (4.1 kB) File type Wheel Python version py3 Upload date Hashes View
Filename, size toms-0.4.5.tar.gz (3.0 kB) File type Source Python version None Upload date Hashes View

Supported by

Pingdom Pingdom Monitoring Google Google Object Storage and Download Analytics Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN DigiCert DigiCert EV certificate StatusPage StatusPage Status page