summaryrefslogtreecommitdiffstats
path: root/konsolekalendar/konsolekalendarepoch.cpp
diff options
context:
space:
mode:
authortpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2010-07-31 19:53:50 +0000
committertpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2010-07-31 19:53:50 +0000
commit7be55ffa061c026e35e2d6a0effe1161ddb0d41f (patch)
tree8474f9b444b2756228600050f07a7ff25de532b2 /konsolekalendar/konsolekalendarepoch.cpp
parentf587f20a6d09f1729dd0a8c1cd8ee0110aec7451 (diff)
downloadtdepim-7be55ffa061c026e35e2d6a0effe1161ddb0d41f.tar.gz
tdepim-7be55ffa061c026e35e2d6a0effe1161ddb0d41f.zip
Trinity Qt initial conversion
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdepim@1157655 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'konsolekalendar/konsolekalendarepoch.cpp')
-rw-r--r--konsolekalendar/konsolekalendarepoch.cpp26
1 files changed, 13 insertions, 13 deletions
diff --git a/konsolekalendar/konsolekalendarepoch.cpp b/konsolekalendar/konsolekalendarepoch.cpp
index c070d2532..e469a42c2 100644
--- a/konsolekalendar/konsolekalendarepoch.cpp
+++ b/konsolekalendar/konsolekalendarepoch.cpp
@@ -33,7 +33,7 @@
#include <stdlib.h>
#include <iostream>
-#include <qdatetime.h>
+#include <tqdatetime.h>
#include "konsolekalendarepoch.h"
using namespace KCal;
@@ -50,22 +50,22 @@ KonsoleKalendarEpoch::~KonsoleKalendarEpoch()
// By "epoch" we mean the number of seconds since 00:00:00 UTC on January 1 1970
// Function to convert an epoch value into a QDateTime
-QDateTime KonsoleKalendarEpoch::epoch2QDateTime( uint epoch )
+TQDateTime KonsoleKalendarEpoch::epoch2TQDateTime( uint epoch )
{
- QDateTime dt;
+ TQDateTime dt;
dt.setTime_t( epoch, Qt::UTC );
return( dt );
}
-// Function to convert a QDateTime value into an epoch
-uint KonsoleKalendarEpoch::QDateTime2epoch( QDateTime dt )
+// Function to convert a TQDateTime value into an epoch
+uint KonsoleKalendarEpoch::QDateTime2epoch( TQDateTime dt )
{
// THIS FUNCTION CAN BE OFF BY 1 HOUR DUE TO DAYLIGHT SAVINGS TIME.
// SORRY QT DOESN'T HANDLE DAYLIGHT SAVINGS TIME.
// Compute #seconds to subtract for local timezone difference from UTC.
- int offset = QDateTime::currentDateTime( Qt::UTC ).toTime_t()
- - QDateTime::currentDateTime( Qt::LocalTime ).toTime_t();
+ int offset = TQDateTime::currentDateTime( Qt::UTC ).toTime_t()
+ - TQDateTime::currentDateTime( Qt::LocalTime ).toTime_t();
return( dt.toTime_t() - offset );
}
@@ -76,7 +76,7 @@ uint KonsoleKalendarEpoch::QDateTime2epoch( QDateTime dt )
main()
{
uint epoch;
- QDateTime dt;
+ TQDateTime dt;
cout << endl;
cout << "NOTE: Some tests may be off by 1 hour (3600 secs) "
@@ -85,7 +85,7 @@ main()
// Test1
epoch = 0;
- dt = KonsoleKalendarEpoch::epoch2QDateTime( epoch );
+ dt = KonsoleKalendarEpoch::epoch2TQDateTime( epoch );
cout << "TEST 1:" << endl;
cout << "epoch="
<< epoch
@@ -103,7 +103,7 @@ main()
// Test2
epoch = 100000;
- dt = KonsoleKalendarEpoch::epoch2QDateTime( epoch );
+ dt = KonsoleKalendarEpoch::epoch2TQDateTime( epoch );
cout << "TEST 2:" << endl;
cout << "epoch="
<< epoch
@@ -121,7 +121,7 @@ main()
// Test3
epoch = 10000000;
- dt = KonsoleKalendarEpoch::epoch2QDateTime( epoch );
+ dt = KonsoleKalendarEpoch::epoch2TQDateTime( epoch );
cout << "TEST 3:" << endl;
cout << "epoch="
<< epoch
@@ -139,7 +139,7 @@ main()
// Test4
epoch = 1000000000;
- dt = KonsoleKalendarEpoch::epoch2QDateTime( epoch );
+ dt = KonsoleKalendarEpoch::epoch2TQDateTime( epoch );
cout << "TEST 4:" << endl;
cout << "epoch="
<< epoch
@@ -157,7 +157,7 @@ main()
// Test5
epoch = 10000000000;
- dt = KonsoleKalendarEpoch::epoch2QDateTime( epoch );
+ dt = KonsoleKalendarEpoch::epoch2TQDateTime( epoch );
cout << "TEST 5:" << endl;
cout << "epoch="
<< epoch