[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-devel
Subject: Re: QDateTime -> time_t ??
From: Michael Goffioul <goffioul () imec ! be>
Date: 2002-08-20 12:34:57
[Download RAW message or body]
> Nope, but you could try
>
> QDateTime theTimeIWantToConvertToTimeT;
> QDateTime epoch;
> epoch.setTime_t(0);
> time_t t = epoch.secsTo(theTimeIWantToConvertToTimeT);
My first try was
QDateTime(QDate(1970,1,1),QTime(0,0,0)).secsTo(myTime)
but I got 2 hours shift. Your solution gives me 1 hour shift. Note
that my timezone in Europe/Brussels.
Michael.
--
------------------------------------------------------------------
Michael Goffioul IMEC-DESICS-MIRA
e-mail: goffioul@imec.be (Mixed-Signal and RF Applications)
Tel: +32/16/28-8510 Kapeldreef, 75
Fax: +32/16/28-1515 3001 HEVERLEE, BELGIUM
------------------------------------------------------------------
>> Visit http://mail.kde.org/mailman/listinfo/kde-devel#unsub to unsubscribe <<
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic