Created
November 2, 2021 03:22
-
-
Save twinsant/de81014bbbc6f8ef7b294068ec64907a to your computer and use it in GitHub Desktop.
Alfred Workflows: Timestamp
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import sys | |
| import time | |
| from datetime import datetime | |
| query = "{query}" | |
| ts = float(query) | |
| if ts > time.time(): | |
| ts = ts/1000 | |
| dt = datetime.fromtimestamp(ts) | |
| sys.stdout.write(str(dt)) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment