I want to get date and time from database then use it to compare with current date and time. I'm able to get time from database and compare it with the computer's time but I want to use a specific time which is same for everyone. Basically I want to get time from web. I couldn't figure NTP and SNTP
if (myReader.HasRows)
{
myReader.Read();
var expiryDate = myReader.GetDateTime("expirationdate");
if (DateTime.UtcNow.AddHours(2) > expiryDate)
{
}
else
{
}
}