{ "_id" : 1, "date" : ISODate("2019-06-23T00:00:00Z"), "tempsF" : [ 39.2, 53.6, 62.6 ] }
{ "_id" : 2, "date" : ISODate("2019-07-07T00:00:00Z"), "tempsF" : [ 57.2, 75.2, 51.8 ] }
{ "_id" : 3, "date" : ISODate("2019-10-30T00:00:00Z"), "tempsF" : [ 64.4, 42.8, 46.4 ] }
Where does the “T00:00:00Z” in “ISODate” come from?
to understand where did this come from in MongoDB database documents.
CodePudding user response:
ISODate() is a helper function that’s built into MongoDB and it provides output in global standardised ISO 8601 date format that is “YYYY-MM-DDTHH:mm:ssZ”. Here “T” separates the date portion from the time-of-day portion. The Z on the end means UTC 11 (that is, an offset-from-UTC of zero hours-minutes-seconds). Also, that these default to 00:00:00 because time was not defined.