procedure Datetime2Gmt(tDatetime as Datetime) as String
local cGmt
if Empty(m.tDatetime)
m.tDatetime = Datetime()
endif
*---> Mise à jour à l'heure GMT
m.tDatetime = m.tDatetime - DecalageGmt(m.tDatetime) * 3600
return GetWordNum("Mon,Tue,Wed,Thu,Fri,Sat,Sun", Dow(m.tDatetime, 2), ",") + ", " +;
Ltrim(Str(Day(m.tDatetime))) + " " +;
GetWordNum("Jan,Feb,Mar,Apr,May,Jun,Jul,Aug,Sep,Oct,Nov,Dec", Month(m.tDatetime), ",") + " " +;
Str(Year(m.tDatetime), 4) + " " + Substr(Ttoc(m.tDatetime), 12, 8) + " GMT"
endproc && Datetime2Gmt
procedure DecalageGmt(tDateTime as DateTime) as Integer
local dDate, tMars, tOctobre
*---> Recherche du dernier dimanche de mars à 3h du matin
m.dDate = Date(Year(m.tDateTime), 3, 31)
m.tMars = Dtot(m.dDate - Dow(m.dDate, 2) % 7) + 3 * 3600
*---> Recherche du dernier dimanche d'octobre à 2h du matin
m.dDate = Date(Year(m.tDateTime), 10, 31)
m.tOctobre = Dtot(m.dDate - Dow(m.dDate, 2) % 7) + 2 * 3600
return Iif(Between(m.tDateTime, m.tMars, m.tOctobre), 2, 1)
endproc && DecalageGmt
|
où as tu trouver cet appel de l'API GetTimeZoneInformation sans parametre?
MSDN ne la donne pas?
bon boulot en tous cas.