Created
February 28, 2021 18:18
-
-
Save thefury/75c9b76133be888791a1c3b220cda534 to your computer and use it in GitHub Desktop.
Convert an arbitrary local date to UTC.
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
| #!/usr/bin/env bash | |
| # Convert an arbitrary date in the format of "YYY-MM-DD HH:MM" from | |
| # local time to UTC. | |
| date -u --date=@$(date "+%s" --date="2021-02-28 03:06") |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment