Hướng dẫn how is datetime stored in mongodb? - datetime được lưu trữ trong mongodb như thế nào?
Show
Ngày và thời gian trong lập trình có thể là một thách thức. Sự kiện đang diễn ra trong múi giờ nào? Định dạng ngày nào đang được sử dụng? Đó là use temp_db db.dates.insertMany([ { name: "Created with `Date()`", date: Date(), }, { name: "Created with `new Date()`", date: new Date(), }, { name: "Created with `ISODate()`", date: ISODate(), }, ]) use temp_db db.dates.insertMany([ { name: "Created with `Date()`", date: Date(), }, { name: "Created with `new Date()`", date: new Date(), }, { name: "Created with `ISODate()`", date: ISODate(), }, ]) 7 or |