Last active
December 14, 2016 02:45
-
-
Save yyamasak/4e7c2f001ae9d7e38a3bfea7a9329dbe to your computer and use it in GitHub Desktop.
Tcl + sqlite3 script to parse an ISO8601 datetime string
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
package require sqlite3 | |
sqlite3 mdb :memory: | |
set dt "2016-12-13T18:54:21.182556" | |
set unixepoch [mdb eval {SELECT strftime('%s',$dt,'UTC')}] | |
puts $unixepoch | |
#=> 1481622861 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment