# Human-readable date (2026-10-24 09:46:40) set date_string "2026-10-24 09:46:40" # Convert Date to Unix timestamp set unix_timestamp [clock scan $date_string -format "%Y-%m-%d %H:%M:%S" -gmt true] # Output the Unix timestamp puts "Unix Timestamp: $unix_timestamp"
clock scan $date_string
-format "%Y-%m-%d %H:%M:%S"
-gmt true
clock format
clock format 1514764800 -format "%Y-%m-%d %H:%M:%S"
clock scan
clock scan "2018-07-15 12:30:45" -format "%Y-%m-%d %H:%M:%S"
clock seconds
-gmt
clock format 1514764800 -gmt true
-format