-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
Why is the local time zone used in CAP? #1518
Comments
Using the local time zone makes the data easier to read for humans. Unless a major bug occurs, we will not adjust to using UTC for data compatibility. I have a question, why do your instances have different timezone when scaling horizontally, aren't you specifying the time zone in Docker? |
Thank you for @yang-xiaodong reply. I understand what you mean. When we horizontally expand the same application, we should ensure that the time zone is consistent. This is a correct suggestion. |
Issues can easily arise in international projects. A reasonable approach is to use UTC(DateTime.UtcNow) time for message storage and processing to avoid problems caused by time zone differences. |
I don't think so, if the publisher and the consumer are in different time zones, then the corresponding apps are in different time zones, for the publisher to see his time zone, and for the consumer to see his own time zone |
For the use case in our international project, this is not an issue; the time zone displayed on the front-end and the time zone stored do not need to be strictly the same. All times are converted to UTC and returned to the frontend for formatting into local time. |
The requirement described in issue #895 is reasonable for Daylight Saving Time switching, but our investigation found that some databases don't support storing DateTimeOffset, so we won't deal with it for now. |
你上面说的对,并不是所有数据库都支持DateTimeOffset,这一点在.net上是非常友好的,我们在兼容性角度,确实不应该轻易采用DateTimeOffset。 当然,采用timestamp也可以解决,但这个更为繁琐。 |
Closed, Won't fix now. |
Description
The following are examples of data :
Instance A Time zone : UTC +0 & Instance B Time zone : UTC +8
Published table
Received table
Question
Future
The text was updated successfully, but these errors were encountered: