Hi all, please could you help me with a simple problem?
I have some parsing code like this: https://play.golang.org/p/6bVyWg4FCVN
It writes
20190211T103847+0000
<nil>
2019-02-11 10:38:47 +0000 *UTC*
on the server.
When I put the code into test,
package tcx_test
import (
"fmt"
"testing"
"time"
)
func TestTemp(t *testing.T) {
date := "20190211T103847-0000"
parsed, err := time.Parse("20060102T150405-0700", date)
fmt.Println(date)
fmt.Println(err)
fmt.Println(parsed)
}
it outputs
>go test
20190211T103847-0000
<nil>
2019-02-11 10:38:47 +0000 *+0000*
PASS
ok tc/tcx 0.048s
Why there is UTC in the first output, but +0000 in the second one?
--
You received this message because you are subscribed to the Google Groups
"golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/d/optout.