summaryrefslogtreecommitdiffstats
path: root/konsolekalendar/konsolekalendarepoch.cpp
diff options
context:
space:
mode:
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 c070d253..e469a42c 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