Uploaded image for project: 'Go Driver'
  1. Go Driver
  2. GODRIVER-1596

Issues with Time unmarshalling

    XMLWordPrintableJSON

Details

    • Icon: Bug Bug
    • Resolution: Works as Designed
    • Icon: Major - P3 Major - P3
    • None
    • 1.2.1
    • BSON, JSON & ExtJSON
    • None
    • go version go1.13.3 windows/amd64

    Description

      Version : go version go1.13.3 windows/amd64
      Mongo Driver Version : go.mongodb.org/mongo-driver v1.2.1

      I'm fetching the Date stored in MongoDB. The value stored in DB is
      reservedDate: 2020-02-19T07:11:23.890+00:00

      After Unmarshalling the response into time.Time field the value becomes
      "reservedDate": "2020-02-19T07:11:23.89Z"

      890 MilliSecond become 89, similarlly 100 becomes 1. The trailing Zeros are getting truncated.

      Attachments

        Activity

          People

            divjot.arora@mongodb.com Divjot Arora (Inactive)
            abhay.kumar1@pb.com Abhay Kumar
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: