0

I use github.com/mongodb/mongo-go-driver driver in golang My code struct:

type Document struct {
   CreatedAt time.Time `bson:"createdAt"`
}

When I insert a document, it is inserted as ISODate (), it looks like this:

{
    "createdAt" : ISODate("2019-06-12T08:55:45Z")
}

From the code, when I receive the document, he read in the UTC time zone. I want to convert the date in my local Timezone system. Is there any way to do this with the driver

erofeev
  • 101
  • 1

0 Answers0