Last active
August 29, 2015 13:57
-
-
Save javouhey/9589569 to your computer and use it in GitHub Desktop.
#golang parse video time spec on CLI
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
const ( | |
mylayout = "15:04:05" | |
) | |
t2, _ := time.Parse(mylayout, "23:59:59") // (EXTRA time.Time=0000-01-01 23:59:59 +0000 UTC) | |
t2, _ = time.Parse(mylayout, "3:59:59") // (EXTRA time.Time=0000-01-01 03:59:59 +0000 UTC) | |
t2, _ = time.Parse(mylayout, "03:59:59") // (EXTRA time.Time=0000-01-01 03:59:59 +0000 UTC) | |
t2, _ = time.Parse(mylayout, "13:59:59") // (EXTRA time.Time=0000-01-01 13:59:59 +0000 UTC) | |
t2, _ = time.Parse(mylayout, "1:59:59") // (EXTRA time.Time=0000-01-01 01:59:59 +0000 UTC) | |
// @see http://play.golang.org/p/SPyjsNullP |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment