Skip to content

Instantly share code, notes, and snippets.

@wyattjoh
Created August 4, 2016 20:57
Show Gist options
  • Save wyattjoh/54bd8c8c2ced68be5843d71b302004ac to your computer and use it in GitHub Desktop.
Save wyattjoh/54bd8c8c2ced68be5843d71b302004ac to your computer and use it in GitHub Desktop.
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