Ranadhir
Ranadhir

Reputation: 109

Client date and server date confusion

I am working on a website in ASP.NET where e-mails can be scheduled for the future. But the problem is with the date difference between server and client.
As the server is in India, a USA user can schedule a date after today's date, as their time zone is different. Then this e-mail will never be sent, as the date has already been passed here.
Please suggest me how to deal with this matter.

Upvotes: 0

Views: 332

Answers (2)

user1921
user1921

Reputation:

Use UTC time instead of local time.

Here's a link to an article in case you need more information: https://web.archive.org/web/20201202215446/http://www.4guysfromrolla.com/articles/081507-1.aspx

Upvotes: 2

Sruly
Sruly

Reputation: 10550

use UTC time and convert all times to it before you set the schedule.

Upvotes: 1

Related Questions