I have a system that initially didn't need to control so tight the dates and times (it only worked in a single timezone), but as a requirement now we need to use multiple timezones on this system.
The problem is that this system will be prepared to run over multiple EC2 instances storing information into an Aurora instance with multiple replica servers.
Aditionally, this system will control sessions on a redis instance or AWS-like service.
My question is:
What are the best practices to control where o which service will write this dates and ensure precision on dates when saving or getting them?
I've heard that the best way to ensure the most accurate dates is using an NTP server, but also I've heard of someone that lost the connection with an NTP server and their dates had a delay when he detected it.
I have some assupmtions like:
- Maybe the best way to store this is always on UTC and then transform the date depending on each timezone.
- Possibly the redis or redis-like AWS service has to have it's own date control.
I know that it's not the first system dealing with this problems, but I really don't know where to start.
Thank you in advice.