[Mono-list] RE: System.TimeZone

Duncan Mak duncan@ximian.com
17 Feb 2002 10:33:46 -0500


On Sun, 2002-02-17 at 05:58, Dwivedi , Ajay Kumar wrote:
> 	Precisely. Both the DaylightTime will be different. But the problem
> lies with the fact that DaylightTime corresponds to a given year (for
> example
> we call GetDaylightChanges (int year)). So both Start and End of
> DaylightTime
> are in the same year. The following example makes it clear:
> 
> 	TimeZone tz = TimeZone.CurrentTimeZone;
> 	System.Console.WriteLine("DAYLIGHT NAME : "+ tz.DaylightName);
> 	DaylightTime dt = tz.GetDaylightChanges(2002);
> 	System.Console.WriteLine("START : "+ dt.Start);
> 	System.Console.WriteLine("END   : "+ dt.End);
> 
> The sample results for 3 different TimeZones are:
> 1. No Daylight Saving:
> 	DAYLIGHT NAME : India Standard Time
> 	START : 01/01/0001 00:00:00
> 	END   : 01/01/0001 00:00:00
> 2. Northern Hemisphere
> 	DAYLIGHT NAME : Vladivostok Daylight Time
> 	START : 31/03/2002 02:00:00
> 	END   : 27/10/2002 03:00:00
> 3. Southern Hemisphere
> 	DAYLIGHT NAME : New Zealand Daylight Time
> 	START : 06/10/2002 02:00:00
> 	END   : 17/03/2002 02:00:00
> 
> 	Note that for the Northern Hemisphere, START < END
> while START > END for the Southern Hemisphere. This is because
> the DST period is Oct to Mar in South. So DST ends in March
> and Starts in October.
>

This is wonderful, thanks for the detailed explanation! I'll apply the
rest of your patch today.

Duncan.