# Created on savesnippets.com · https://savesnippets.com/7ZKeA56zq35cxK # Current epoch date +%s # 1735689600 # Epoch to human (UTC) date -u -d @1735689600 +"%F %T UTC" # 2025-01-01 00:00:00 UTC # Epoch to human (local TZ) date -d @1735689600 # Tue Dec 31 18:00:00 CST 2024 # Human → epoch date -d "2025-01-01 00:00:00 UTC" +%s # 1735689600 # Epoch in milliseconds (for JS timestamps) echo $(( $(date +%s) * 1000 )) # 1735689600000 # Or with nanosecond precision date +%s%N | cut -c1-13 # epoch ms via slice