nntp2http.com
Posting
Suche
Optionen
Hilfe & Kontakt

How to convert "struct tm" to the time in seconds

Von: Juergen Beisert (jbeisert@netscape.net) [Profil]
Datum: 04.07.2009 22:17
Message-ID: <h2odce$3mr$00$1@news.t-online.com>
Newsgroup: de.comp.os.unix.programming
Hi,

does anybody know how to convert a time given in UTC in a "struct tm" into
the regular system time in seconds (also UTC)?

My problem is, my timezone is CET/CEST and "struct tm" is handled as a wall
clock (AFAIK). So, mktime() will convert the time with regard to my
timezone.
Is there a way to disable this (nice) feature? Or do I have to convert it by
myself to do a conversion UTC to UTC without timezone consideration?

Thanks in advance for some hints.
jbe

[ Auf dieses Posting antworten ]

Antworten