mdl29 / scratchy

Scratchy, application de tchat projet LPH
GNU General Public License v3.0
2 stars 8 forks source link

[back] Date as ISO-8601 #228

Open Benvii opened 3 years ago

Benvii commented 3 years ago

Date on messages aren't in ISO-8601 :

{
  "messages": [
    {
      "author": "60d7207f468fc3596b100b3e", 
      "content": "test TS", 
      "id": "60d723b5468fc3596b100b42", 
      "roomId": "60d723ad468fc3596b100b41", 
      "timestamp": "2021-06-26T12:55:17.802000"
    }
  ]
}

Date should be : 2021-06-26T12:55:17.802000Z

Draeggon commented 3 years ago

sadly it seem that mongoengine is storing time like that and i can't do anything about that

yannis-mlgrn commented 2 years ago

@Draeggon , @Benvii .We close the issue ?

Draeggon commented 2 years ago

I can only add the timezone in the form +00:00 but javascript seem to understand this well and replace it with a Z when converted from string. I will submit a pr soon