If I store current time like this:
type Test struct {
Id string `bson:"id" json:"id,omitempty"`
TestTime time.Time `bson:"testTime" json:"testTime,omitempty"`
}
...
t := Test {
Id : "TEST0001",
TestTime : time.Now(),
}
...
c.Insert(t)
Then I use mongochef to search it :
{
"_id" : ObjectId("576bc7a48114a14b47920d60"),
"id" : "TEST0001",
"testTime" : ISODate("2016-06-23T11:27:30.447+0000")
}
So, mgo store ISODate by default, how can I store Date not ISODate ?