#Issue with Time.parse

5 messages · Page 1 of 1 (latest)

misty plume
#

I am trying to parse 2 times, but one always fails

for _, r := range x.Copy().Records()[2:4] {
        fmt.Println(r[13], r[14])
        t1, _ := time.Parse("2006-01-02 15:04:05 MST", r[13]+" GMT")
        t2, _ := time.Parse("2006-01-02 15:04:05 MST", r[14]+" GMT")
        fmt.Println(t1, t2)
        fmt.Println("........")
    }

i can't figure out what's the issue

latent escarp
#

Don't ignore error maybe it'll give you hint

misty plume
#

~< gosh yeah

#

there was \x0d in the string hidden

latent escarp
#

👍