Club Delphi  
    Paypal   FTP   CCD     Buscar   Trucos   Trabajo   Foros

Retroceder   Foros Club Delphi > Principal > Varios
Registrarse FAQ Miembros Calendario Guía de estilo Buscar Temas de Hoy Marcar Foros Como Leídos

Coloboración Paypal con ClubDelphi

 
 
Herramientas Buscar en Tema Desplegado
  #6  
Antiguo 10-06-2004
Javinho Javinho is offline
Registrado
 
Registrado: may 2004
Posts: 3
Poder: 0
Javinho Va por buen camino
Ahora si

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
Responder Con Cita
 


Herramientas Buscar en Tema
Buscar en Tema:

Búsqueda Avanzada
Desplegado

Normas de Publicación
no Puedes crear nuevos temas
no Puedes responder a temas
no Puedes adjuntar archivos
no Puedes editar tus mensajes

El código vB está habilitado
Las caritas están habilitado
Código [IMG] está habilitado
Código HTML está deshabilitado
Saltar a Foro


La franja horaria es GMT +2. Ahora son las 16:00:46.


Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2026, Jelsoft Enterprises Ltd.
Traducción al castellano por el equipo de moderadores del Club Delphi
Copyright 1996-2007 Club Delphi