Created
August 4, 2016 20:57
-
-
Save wyattjoh/54bd8c8c2ced68be5843d71b302004ac to your computer and use it in GitHub Desktop.
This file contains 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 main | |
import ( | |
"fmt" | |
"time" | |
) | |
func main() { | |
const value = "2015-08-04 14:33:21.89115181 -0600 MDT" | |
const layout = "2006-01-02 15:04:05.999999999 -0700 MST" | |
t, err := time.Parse(layout, value) | |
if err != nil { | |
panic(err) | |
} | |
fmt.Println(t.String()) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment