Wie speichern Sie Zeitstempel? Sind erstellte und aktualisierte Felder automatisch verfügbar?

Was ist der beste Weg zum speichern von Zeitstempeln in MongoDB?

  1. Welches format ist am besten:
    # "created": { "d" : "2010-03-29", "t" : "20:15:34" }
    # "created": "12343545234" # seconds since epoc
    # "created": "2010-03-14T21:20:14+0000"
  2. Gibt es eine Möglichkeit zu haben, MongoDB automatisch eingestellt created und updated Felder?

InformationsquelleAutor der Frage ma11hew28 | 2010-09-16

Schreibe einen Kommentar