aboutsummaryrefslogtreecommitdiff
path: root/backends/PalmOS
diff options
context:
space:
mode:
authorChris Apers2003-11-28 10:03:42 +0000
committerChris Apers2003-11-28 10:03:42 +0000
commit49b1fc4c850654c2c948b2425e1c8cdb1a978d44 (patch)
tree03655d90ad46b508dcb3444686efefa826fd48e0 /backends/PalmOS
parent134ae181f4f541ff8b6949fd4bfcdd6f9f78640e (diff)
downloadscummvm-rg350-49b1fc4c850654c2c948b2425e1c8cdb1a978d44.tar.gz
scummvm-rg350-49b1fc4c850654c2c948b2425e1c8cdb1a978d44.tar.bz2
scummvm-rg350-49b1fc4c850654c2c948b2425e1c8cdb1a978d44.zip
Fixed localtime function
svn-id: r11404
Diffstat (limited to 'backends/PalmOS')
-rw-r--r--backends/PalmOS/Src/missing/_time.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/backends/PalmOS/Src/missing/_time.cpp b/backends/PalmOS/Src/missing/_time.cpp
index eaa0d8fe30..9dda9aeb80 100644
--- a/backends/PalmOS/Src/missing/_time.cpp
+++ b/backends/PalmOS/Src/missing/_time.cpp
@@ -26,7 +26,7 @@
time_t time(time_t *tloc) {
UInt32 secs = TimGetSeconds(); // since 1/1/1904 12AM.
- DateTimeType Epoch = {0, 0, 0, 1, 1, 1970, 0}; // form 1/1/1904 12AM to 1/1/1970 12AM
+ DateTimeType Epoch = {1, 0, 0, 1, 1, 1970, 0}; // form 1/1/1904 12AM to 1/1/1970 12AM
secs -= TimDateTimeToSeconds (&Epoch);
@@ -52,8 +52,8 @@ struct tm *localtime(const time_t *timer) {
tmDate.tm_min = dt.minute;
tmDate.tm_hour = dt.hour;
tmDate.tm_mday = dt.day;
- tmDate.tm_mon = dt.month;
- tmDate.tm_year = dt.year;
+ tmDate.tm_mon = dt.month - 1;
+ tmDate.tm_year = dt.year - 1900;
tmDate.tm_wday = dt.weekDay;
return &tmDate;