Skip to content

Instantly share code, notes, and snippets.

@jazzsequence
Created June 30, 2026 15:14
Show Gist options
  • Select an option

  • Save jazzsequence/6c264d1a5cf39dc8ccd0193d9178a969 to your computer and use it in GitHub Desktop.

Select an option

Save jazzsequence/6c264d1a5cf39dc8ccd0193d9178a969 to your computer and use it in GitHub Desktop.
Create a timestamp
#!/bin/bash
set -euo pipefail
IFS=$'\n\t'
# Store this file with no extension in a location where you keep executables (I use ~/bin).
# Run: chmod +x timestamp
# Maks sure the folder you're using is automatically loaded by your shell.
# In a terminal, type: timestamp
# Get the timestamp!
date -u +"%Y-%m-%dT%H:%M:%SZ"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment