I'm having a strange issue where the JSON encoded string of a time.Time
is varying between my development environment (OSX) and production environment (Ubuntu 14.04 x64).
type Thang struct {
CreatedAt time.Time `json:"created_at"`
}
OSX:
{
// RFC3339 layout
created_at: "2015-04-24T22:39:59Z",
}
Ubuntu 14.04 x64:
{
// RFC3339Nano layout
created_at: "2015-05-21T15:00:46.546000003Z",
}
I've googled around forever. Can't figure this one out. Here's some more info:
- It's a straight forward web services app
- Running
go 1.4.1
on my OSX machine - I cross compile the app on my OSX machine for deployment like this:
GOOS=linux GOARCH=amd64 go build
Would appreciate any insight!