Comments (8)
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?
from cap.
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.
But if the time zones of the sender and receiver of the message do not match, it will cause confusion in the corresponding sendTime in the Content. Can we change the time type to DateTimeOffset? that this can solve this problem.
from cap.
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.
from cap.
But if the time zones of the sender and receiver of the message do not match, it will cause confusion in the corresponding sendTime in the Content. Can we change the time type to DateTimeOffset? that this can solve this problem.
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
from cap.
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.
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.
from cap.
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.
from cap.
你上面说的对,并不是所有数据库都支持DateTimeOffset,这一点在.net上是非常友好的,我们在兼容性角度,确实不应该轻易采用DateTimeOffset。
但是在CAP使用DateTime.UtcNow处理时间是完全兼容的,这和用DateTime.Now并没有区别,但是可以解决当开发者不在同一时区或者服务器没有配置时区时所有发送者和订阅者处理消息都在同一时间维度。
当然,采用timestamp也可以解决,但这个更为繁琐。
from cap.
Closed, Won't fix now.
from cap.
Related Issues (20)
- CAP has not been started! HOT 4
- Question about parallel execution HOT 6
- Error in Nats transport HOT 4
- 能不能加个配置,可以单独启用消费功能或发送功能 ? HOT 2
- How to Introduce Multiple Database Providers? HOT 1
- .NET Core 8 使用RabbitMQ 报No ip address could be resolved for【hostName】的问题 HOT 1
- Optimizing RabbitMQ Performance and Managing Multiple Instances in CAP HOT 2
- Feature Request: Per-Queue Configuration for BasicQos and ConsumerThreadCount HOT 3
- 消息持久化支持达梦数据库吗 HOT 1
- Is the message data structure compatible with older versions of 3.0? HOT 1
- Add new option for parallel publish send. HOT 2
- Add option for controlling reponse headers from OnSubscribeExecuted HOT 2
- NATS Connection Error after Restarting nats-server: Unable to Publish Messages HOT 5
- SQL Server replication readpast error! "You can only specify the READPAST lock in the READ COMMITTED or REPEATABLE READ isolation levels" HOT 3
- 一个进程内可以创建多个CAP吗? HOT 1
- NATS feature: add the possibility to disable dynamic consumer subject/topic creation through NatsCapOtpions HOT 1
- 一个程序进程会操作多个不同的业务数据库,参考#998创建多个发布者进行对应处理,消费者应该如何处理消息? HOT 1
- Feature Request: Add New Column in table Cap.published for relation to table every single data publish HOT 2
- Callback on IIS Idle state HOT 2
- Cap-dashboard empty using dynamic subscribers with Azure Service Bus
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from cap.