mirror of
https://foundry.openuru.org/gitblit/r/CWE-ou-minkata.git
synced 2025-07-13 18:17:49 -04:00
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.
This commit is contained in:
@ -257,9 +257,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();
|
||||
|
@ -128,7 +128,7 @@ public:
|
||||
void SetSecsDouble(double secs);
|
||||
void SetMicros(const uint32_t 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;}
|
||||
|
Reference in New Issue
Block a user