Skip to content

Instantly share code, notes, and snippets.

@linux4life798
Last active May 27, 2024 00:01
Show Gist options
  • Save linux4life798/53137b3182f07978b7cb02d86b4f55bb to your computer and use it in GitHub Desktop.
Save linux4life798/53137b3182f07978b7cb02d86b4f55bb to your computer and use it in GitHub Desktop.
Print a file path worthy timestamp
# Date formatting for file name purposes.
# You can lock in one timezone by setting the TZ environment variable.
# 2024-05-26_04:55:50PM_PDT
TZ='America/Los_Angeles' date "+%Y-%m-%d_%I:%M:%S%p_%Z"
# 2024-05-26_07:59:06PM_EDT
TZ='America/New_York' date "+%Y-%m-%d_%I:%M:%S%p_%Z"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment