From ae70312b1613e26b4ef89a2c9821d9531b82e987 Mon Sep 17 00:00:00 2001 From: eilers Date: Mon, 22 Dec 2003 10:19:25 +0000 Subject: Finishing implementation of sql-backend for datebook. But I have to port the PIM datebook application to use it, before I could debug the whole stuff. Thus, PIM-Database backend is finished, but highly experimental. And some parts are still generic. For instance, the "queryByExample()" methods are not (or not fully) implemented. Todo: custom-entries not stored. The big show stopper: matchRegExp() (needed by OpieSearch) needs regular expression search in the database, which is not supported by sqlite ! Therefore we need either an extended sqlite or a workaround which would be very slow and memory consuming.. --- (limited to 'libopie/pim/otimezone.cpp') diff --git a/libopie/pim/otimezone.cpp b/libopie/pim/otimezone.cpp index b2bd3aa..34659c3 100644 --- a/libopie/pim/otimezone.cpp +++ b/libopie/pim/otimezone.cpp @@ -16,11 +16,16 @@ namespace { } QDateTime utcTime( time_t t, const QString& zone) { QCString org = ::getenv( "TZ" ); +#ifndef Q_OS_MACX // Following line causes bus errors on Mac ::setenv( "TZ", zone.latin1(), true ); ::tzset(); tm* broken = ::localtime( &t ); ::setenv( "TZ", org, true ); +#else +#warning "Need a replacement for MacOSX!!" + tm* broken = ::localtime( &t ); +#endif QDateTime ret; ret.setDate( QDate( broken->tm_year + 1900, broken->tm_mon +1, broken->tm_mday ) ); @@ -41,12 +46,16 @@ namespace { broken.tm_sec = t.second(); QCString org = ::getenv( "TZ" ); +#ifndef Q_OS_MACX // Following line causes bus errors on Mac ::setenv( "TZ", str.latin1(), true ); ::tzset(); time_t ti = ::mktime( &broken ); ::setenv( "TZ", org, true ); - +#else +#warning "Need a replacement for MacOSX!!" + time_t ti = ::mktime( &broken ); +#endif return ti; } } -- cgit v0.9.0.2