开发者

Client date and server date confusion

开发者 https://www.devze.com 2023-01-13 18:58 出处:网络
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.

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.


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


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

0

精彩评论

暂无评论...
验证码 换一张
取 消