G
Guest
Hi all,
DateTime.ToLocalTime() gives inconsistent results upon shifting the time
zone of the machine on which the program is running.
string LocalDtTimeString =
Convert.ToString(DtClass.ConvertToLocalDateTime(System.DateTime.Parse(strDate)));
where strDate is the string representation of the date fetched from the
database.
and the DtClass method implementation is:
public class DtClass
{
:
:
public static DateTime ConvertToLocalDateTime(DateTime UTCDateTime)
{
return UTCDateTime.ToLocalTime();
}
:
:
}
Your comments are higly appreciated.
Thank you all.
DateTime.ToLocalTime() gives inconsistent results upon shifting the time
zone of the machine on which the program is running.
string LocalDtTimeString =
Convert.ToString(DtClass.ConvertToLocalDateTime(System.DateTime.Parse(strDate)));
where strDate is the string representation of the date fetched from the
database.
and the DtClass method implementation is:
public class DtClass
{
:
:
public static DateTime ConvertToLocalDateTime(DateTime UTCDateTime)
{
return UTCDateTime.ToLocalTime();
}
:
:
}
Your comments are higly appreciated.
Thank you all.