Seite 1 von 1

UTC

Verfasst: Sa, 02. Mär 2013 18:36
von Jan
Hat jemand eine Ahnung, wo ich die UTC herbekomme? Kann man die irgendwo auslesen?

Was ich eigentlich brauche sind die Sekunden seit dem 01.01.1970 0:00 Uhr bis jetzt. Wobei "jetzt" halt die UTC-Zeit sein muß.

Jan

Re: UTC

Verfasst: So, 03. Mär 2013 12:05
von Rudolf
Hallo,

Code: Alles auswählen

function utc_fromsec(nSeconds)
******************************************************************
return {ctod("01.01.1970") + (nSeconds/86400),sectotime(mod(nSeconds,86400))}

function utc_tosec(dDate,cTime)
******************************************************************
return ((date() - ctod("01.01.1970"))*86400) + timetosec(cTime)
Grüße
Rudolf