Prueba lo siguiente:
Código C:
Ver originalusing System.Globalization;
public static DataTable GenerateDST(int startYear, int endYear)
{
DataTable dt = new DataTable();
//get the current timezone
TimeZone oTimeZone = TimeZone.CurrentTimeZone;
DaylightTime oDST;
dt.Columns.Add("Year");
dt.Columns.Add("Start Date");
dt.Columns.Add("End Date");
for (int i = startYear; i <= endYear; i++)
{
oDST = oTimeZone.GetDaylightChanges(i);
dt.Rows.Add(oDST.Start.Year, oDST.Start.ToShortDateString(), oDST.End.ToShortDateString());
}
oTimeZone = null;
oDST = null;
return dt;
}
Qué versión del compact net framework estás usando ?