This project is read-only.

TzTimeZone.GetUtcOffset() and DST

Topics: Developer Forum
Jun 21, 2008 at 6:42 PM


Does TzTimeZone.GetUtcOffset() includes the DST as well? or do i have to deal with it seperately?

I have been using the following code to get data for Karachi. Its under day light savings time now a days.

//the line below returns 6:00 which is correct




Do i need this code as well?

//get DST
if (currentTimeZone.IsDaylightSavingTime(_perspectiveDate))




DaylightTime dstTimeSpan = currentTimeZone.GetDaylightChanges(_perspectiveDate.Year, DateTimeKind.Local);


_DST = dstTimeSpan.Delta.Hours.ToString() +

":" + dstTimeSpan.Delta.Minutes.ToString();