-
Notifications
You must be signed in to change notification settings - Fork 9
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add timezone to message #32
base: master
Are you sure you want to change the base?
Conversation
It looks like this is an issue that should be fixed in the serialization part of |
It appears I made the wrong assumption. LocalDateTime doesn't store or represent a timezone. I think the easier approach here would be to store the creation date of the message as a timezone independent timestamp. Only when we want to display the time again in a human friendly format, we show the times in the timezone of the device. |
By "timezone independent timestamp" you mean saving every message in UTC format, so we have the same reference for all the messages from all the users? Then serializing the LocalDateTime field doesn't work out of the box. Having the extra zoneId as proposed in this PR field helps precisely on that. |
Timezone should only be stored if it is relevant and from what I can see, it seems it is not relevant. You only want to know the point in time when a message was created. When you display that time to the user, you do it in their (aka the device's) timezone. As an example, to make it more clear: a message is created on |
You say that we should remove |
Yes, using |
No description provided.