I get some datetime (ExactDate) from a db. These time are in US timezone, I need to convert them in EU TimeZone.
However if I use :
ExactDate = (DateTime)dr["CREATE_DATE"];
// change exact date to european time
TimeZoneInfo info;
info = TimeZoneInfo.FindSystemTimeZoneById("US Mountain Standard Time");
ExactDate = TimeZoneInfo.ConvertTime(ExactDate,info);
The dates are not converted properly because my computer is seeing the ExactDate as an European date.
Do you know how I can solve this ?
Try converting the date from the other TimeZone to UTC
like
Once you have the corresponding UTC time you can get the European one later on using
.ToLocalHope this is what you want.