Closed bates64 closed 6 years ago
We now store dates to millisecond-level accuracy, however the serialize functions floor the value before they are outputted by the API.
Why?
We're a chat service. This means people send messages quickly - very often multiple times in a single second. Why should we prevent the user (or developers) from knowing the order of messages that came within a single second?
I know that some languages have int types which are separate from floats, but they can just convert the values to integers, if they really need to.
Why should we prevent the user (or developers) from knowing the order of messages that came within a single second?
Unix time is standard. Date.now()
is not. The milliseconds float thing should be specified in the API as a recommended (but not required) practice imo. Serialize shouldn't floor :+1:
message.date
->message.dateCreated
message.editDate
->message.dateEdited