I have a helper class which among other things gets the current datetime. Because our server is 6 hours behind where ALL our customers are from I want to add 6 hours to the datetime. My public method is static and is as follows:
public static DateTime GetCurrentDate()
{
DateTime dt = DateTime.Now;
dt = dt.AddHours(6);
return dt;
}
For some reason if I Response.Write the datetime returned it has not added the 6 hours. If I do the above in an aspx.cs file and write out the result then it works. Am I doing something wrong here?
Thanks
I would look at using DateTimeOffset and UTC