Usually, dealing with such dates, you do all your calculations in UTC format and only switch to local time when this time (pun intended) to display the results. I assume from your question that this is a centralized database that manages all tasks, and you just need them to work at the right local time?
if ( dateTimeUtc == DateTime.UtcNow ) {
Note that DateTime.Now is in local time; you want DateTime.UtcNow for consistency between time zones.
Another thing you should be aware of is that it only starts the task scheduler every 15 minutes, so the probability of a match is exactly equal to 15:15:15. What you would usually like to do is check the reminder time that has appeared since the last run:
var currentRun = DateTime.UtcNow; foreach ( dateTimeUtc in GetReminderDateTimes() ) { if ( dateTimeUtc > lastRun && dateTimeUtc <= currentRun ) { } } lastRun = currentRun;
source share