Skip to content

Instantly share code, notes, and snippets.

@Alchemyst0x
Created January 11, 2025 07:13
Show Gist options
  • Save Alchemyst0x/5ce0cb72fc717a4eaafa7d13afc8272a to your computer and use it in GitHub Desktop.
Save Alchemyst0x/5ce0cb72fc717a4eaafa7d13afc8272a to your computer and use it in GitHub Desktop.
Create an ISO 8601 compliant timestamp (should work on Mac/Linux both).
iso_time() { date -u +"%Y-%m-%dT%H:%M:%S%z" |
sed 's/\(.*\)\([+-]\)\([0-9]\{2\}\)\([0-9]\{2\}\)$/\1\2\3:\4/'; }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment