开发者

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.


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

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜