C # Unexpected Time System

I am creating a reminder system for the software that we have. Currently, I give the user time that they would like to remind, and I store it in the database.

Then later I have a service that periodically checks the database for the duration of the reminder. If the reminder time is the same as the server time, the system sends an email to the user.

I just realized now that this might not work due to differences in time zones.

My question is: what is the best way to handle temporary differences on the server and client so that the reminder is accurate?

For example, our server is set to central time, say, 6:00 pm ...... A user who is on the east coast wants to be reminded at 7:00 pm ... this means that my server needs to be sent a reminder at 18 : 00 server time.

I hope the question is clear.

+4
source share
2 answers

I propose to process everything in UTC internally, and have client software for translation by region. You can then maintain any arbitrary time zone, and if you ever have to move the server to another location or your service becomes popular enough to be multi-volume, you are still fine.

+6
source

Keep everything in universal time and update your customers based on this conversion.

So just put, instead of your customers sending you a request at 6:00 EST, ask them to first compute the conversion between EST and UTC and send you UTC instead.

+2
source

All Articles