From 59b04b546fd5c3e77ec0f3f37504405b64418717 Mon Sep 17 00:00:00 2001 From: Christian Walther Date: Sat, 31 Mar 2012 20:06:55 +0200 Subject: [PATCH] Fix plUnifiedTime::SetGMTime The default value of the "dst" argument must be 0, because -1 leads to incorrect results when the given time falls into local DST. However, a "dst" argument makes no sense on a method that deals with GMT anyway, so remove it entirely. --- .../Sources/Plasma/PubUtilLib/plUnifiedTime/plUnifiedTime.cpp | 4 ++-- .../Sources/Plasma/PubUtilLib/plUnifiedTime/plUnifiedTime.h | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/MOULOpenSourceClientPlugin/Plasma20/Sources/Plasma/PubUtilLib/plUnifiedTime/plUnifiedTime.cpp b/MOULOpenSourceClientPlugin/Plasma20/Sources/Plasma/PubUtilLib/plUnifiedTime/plUnifiedTime.cpp index a7a53574..c6c360b6 100644 --- a/MOULOpenSourceClientPlugin/Plasma20/Sources/Plasma/PubUtilLib/plUnifiedTime/plUnifiedTime.cpp +++ b/MOULOpenSourceClientPlugin/Plasma20/Sources/Plasma/PubUtilLib/plUnifiedTime/plUnifiedTime.cpp @@ -263,9 +263,9 @@ void plUnifiedTime::ToCurrentTime() SetToUTC(); } -hsBool plUnifiedTime::SetGMTime(short year, short month, short day, short hour, short minute, short second, unsigned long usec, int dst) +hsBool plUnifiedTime::SetGMTime(short year, short month, short day, short hour, short minute, short second, unsigned long usec) { - if( !SetTime( year, month, day, hour, minute, second, usec, dst ) ) + if( !SetTime( year, month, day, hour, minute, second, usec, 0 ) ) return false; fSecs -= IGetLocalTimeZoneOffset(); diff --git a/MOULOpenSourceClientPlugin/Plasma20/Sources/Plasma/PubUtilLib/plUnifiedTime/plUnifiedTime.h b/MOULOpenSourceClientPlugin/Plasma20/Sources/Plasma/PubUtilLib/plUnifiedTime/plUnifiedTime.h index bfdb9435..86172eea 100644 --- a/MOULOpenSourceClientPlugin/Plasma20/Sources/Plasma/PubUtilLib/plUnifiedTime/plUnifiedTime.h +++ b/MOULOpenSourceClientPlugin/Plasma20/Sources/Plasma/PubUtilLib/plUnifiedTime/plUnifiedTime.h @@ -129,7 +129,7 @@ public: void SetSecsDouble(double secs); void SetMicros(const UInt32 micros) { fMicros = micros; } hsBool SetTime(short year, short month, short day, short hour, short minute, short second, unsigned long usec=0, int dst=-1); - hsBool SetGMTime(short year, short month, short day, short hour, short minute, short second, unsigned long usec=0, int dst=-1); + hsBool SetGMTime(short year, short month, short day, short hour, short minute, short second, unsigned long usec=0); hsBool SetToUTC(); void ToCurrentTime(); void ToEpoch() { fSecs = 0; fMicros = 0;}