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.
精彩评论