summaryrefslogtreecommitdiff
path: root/libopie2/opiepim/core/opimtimezone.cpp
Unidiff
Diffstat (limited to 'libopie2/opiepim/core/opimtimezone.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--libopie2/opiepim/core/opimtimezone.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/libopie2/opiepim/core/opimtimezone.cpp b/libopie2/opiepim/core/opimtimezone.cpp
index be21b1b..fefceb5 100644
--- a/libopie2/opiepim/core/opimtimezone.cpp
+++ b/libopie2/opiepim/core/opimtimezone.cpp
@@ -20,24 +20,27 @@
20++= -. .` .: details. 20++= -. .` .: details.
21 : = ...= . :.=- 21 : = ...= . :.=-
22 -. .:....=;==+<; You should have received a copy of the GNU 22 -. .:....=;==+<; You should have received a copy of the GNU
23 -_. . . )=. = Library General Public License along with 23 -_. . . )=. = Library General Public License along with
24 -- :-=` this library; see the file COPYING.LIB. 24 -- :-=` this library; see the file COPYING.LIB.
25 If not, write to the Free Software Foundation, 25 If not, write to the Free Software Foundation,
26 Inc., 59 Temple Place - Suite 330, 26 Inc., 59 Temple Place - Suite 330,
27 Boston, MA 02111-1307, USA. 27 Boston, MA 02111-1307, USA.
28*/ 28*/
29 29
30#include "opimtimezone.h" 30#include "opimtimezone.h"
31 31
32/* OPIE */
33#include <opie2/odebug.h>
34
32/* STD */ 35/* STD */
33#include <stdio.h> 36#include <stdio.h>
34#include <stdlib.h> 37#include <stdlib.h>
35#include <sys/types.h> 38#include <sys/types.h>
36 39
37namespace Opie 40namespace Opie
38{ 41{
39 42
40QDateTime utcTime( time_t t ) 43QDateTime utcTime( time_t t )
41{ 44{
42 tm * broken = ::gmtime( &t ); 45 tm * broken = ::gmtime( &t );
43 QDateTime ret; 46 QDateTime ret;
@@ -140,25 +143,25 @@ QDateTime OPimTimeZone::toDateTime( time_t t )
140{ 143{
141 return utcTime( t, m_name ); 144 return utcTime( t, m_name );
142} 145}
143 146
144 147
145/* 148/*
146 * convert dt to utc using zone.m_name 149 * convert dt to utc using zone.m_name
147 * convert utc -> timeZoneDT using this->m_name 150 * convert utc -> timeZoneDT using this->m_name
148 */ 151 */
149QDateTime OPimTimeZone::toDateTime( const QDateTime& dt, const OPimTimeZone& zone ) 152QDateTime OPimTimeZone::toDateTime( const QDateTime& dt, const OPimTimeZone& zone )
150{ 153{
151 time_t utc = to_Time_t( dt, zone.m_name ); 154 time_t utc = to_Time_t( dt, zone.m_name );
152 qWarning( "%d %s", utc, zone.m_name.latin1() ); 155 owarn << "" << utc << " " << zone.m_name << "" << oendl;
153 return utcTime( utc, m_name ); 156 return utcTime( utc, m_name );
154} 157}
155 158
156 159
157time_t OPimTimeZone::fromDateTime( const QDateTime& time ) 160time_t OPimTimeZone::fromDateTime( const QDateTime& time )
158{ 161{
159 return to_Time_t( time, m_name ); 162 return to_Time_t( time, m_name );
160} 163}
161 164
162 165
163time_t OPimTimeZone::fromUTCDateTime( const QDateTime& time ) 166time_t OPimTimeZone::fromUTCDateTime( const QDateTime& time )
164{ 167{