Hola!
Finalmente lo he conseguido así:
Código:
(*
Devuelve true si Date está dentro del horario
de verano y false en caso contrario
*)
function EsHorarioVerano(Date: TDate): Boolean;
var
tzInfo: TTimeZoneInformation;
Horario: DWORD;
begin
Horario:= GetTimeZoneInformation(tzInfo);
if Horario = TIME_ZONE_ID_DAYLIGHT then
Result:= True
else
Result:= False;
end;
:)
No era un problema de configuración regional.
El problema estaba en el formato que se utilizaba.
No era el 5 de octubre sino el último domingo de octubre.
Copiado de la ayuda de windows de 'GetTimeZoneInformation' (StandarDate)
Cita:
Day-in-month format is specified by setting the wYear member to zero,
setting the wDayOfWeek member to an appropriate weekday,
and using a wDay value in the range 1 through 5 to select the correct day in the month.
Using this notation, the first Sunday in April can be specified,
as can the last Thursday in October (5 is equal to "the last").
|
Gracias