Según acabo de ver es algo lioso el tema:
Cita:
Under legislation enacted in 1986, daylight saving time in the USA
begins at 2 a.m. on the first Sunday of April and
ends at 2 a.m. on the last Sunday of October
In most of the countries of western Europe, including the countries that are members of the EEC, daylight saving time:
begins at 1 a.m. GMT on the last Sunday of March and
ends at 1 a.m. GMT on the last Sunday of October
Daylight Saving Time - for the U.S. and its territories - is not observed in Hawaii, American Samoa, Guam, Puerto Rico, the Virgin Islands, the Eastern Time Zone portion of the State of Indiana, and by most of Arizona (with the exception of the Navajo Indian Reservation in Arizona).
In many other countries around the world, daylight saving time lasts from March 30th to October 26th.
This article from the link: http://www.timechange.com/dls/dls1.html
|
Extraido de
http://www.thanhda.com/community/ind...;threadid=2547
Con el siguiente código sacas la fecha según los americanos, quizás tengas que adaptarla.
Código Delphi
[-]
procedure TForm1.Button1Click(Sender: TObject);
var
tzInfo: TTimeZoneInformation;
StandardDate: TDate;
DayLightDate: TDate;
begin
GetTimeZoneInformation(tzInfo);
DaylightDate := EncodeDate(
yearof(date),
tzInfo.DaylightDate.wMonth,
tzInfo.DaylightDate.wDay
);
ShowMessage(FormatDateTime('dd-mm-yyyy',DayLightDate));
StandardDate := EncodeDate(
yearof(date),
tzInfo.StandardDate.wMonth,
tzInfo.StandardDate.wDay
);
ShowMessage(FormatDateTime('dd-mm-yyyy',StandardDate));
end;
Para hallar el primer domingo de un mes determinado uso esto:
Código Delphi
[-]
DecodeDayOfWeekInMonth(FechaAviso, y, m, an, d);
NotaActualizada := EncodeDayOfWeekInMonth(YearOf(Fecha),
MonthOf(Fecha),
1, d); RecodeTime(NotaActualizada, HourOf(FechaAviso),
MinuteOf(FechaAviso),
0, 0);
Saludos