Created
December 7, 2016 17:20
-
-
Save damc-dev/69e27d698569ed362299e0b20cdcd217 to your computer and use it in GitHub Desktop.
Example date formatting
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
#!/bin/sh | |
# Datetime in local timezone | |
echo "* $(date +'%Z'): $(date +'%Y-%m-%dT%H:%M:%S.%N%:z')" | |
# Datetime in specified timezone | |
echo "$(TZ=UTC date +'%Z'): $(TZ=UTC date +'%Y-%m-%dT%H:%M:%S.%N%:z')" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment