summaryrefslogtreecommitdiff
path: root/ACE/ace
diff options
context:
space:
mode:
authorBin Lan <lanbin@scutech.com>2022-03-23 16:19:44 +0800
committerLike Ma <likemartinma@gmail.com>2022-08-14 01:51:01 +0800
commit41cfd85e05e3f72df6fe90353f2e1a2cf3069942 (patch)
treea2f35dd0f0124e02ad89da4ea3ee63eaac7c8716 /ACE/ace
parent44c80da21fe3daed65ce0b19e47b09ba6aa3f438 (diff)
downloadATCD-41cfd85e05e3f72df6fe90353f2e1a2cf3069942.tar.gz
Fix localtime_r emulation for Windows.
Diffstat (limited to 'ACE/ace')
-rw-r--r--ACE/ace/OS_NS_time.cpp6
1 files changed, 1 insertions, 5 deletions
diff --git a/ACE/ace/OS_NS_time.cpp b/ACE/ace/OS_NS_time.cpp
index 81b634f9899..526507eeb1b 100644
--- a/ACE/ace/OS_NS_time.cpp
+++ b/ACE/ace/OS_NS_time.cpp
@@ -253,11 +253,7 @@ ACE_OS::localtime_r (const time_t *t, struct tm *res)
FileTimeToSystemTime (&localtime, &systime);
res->tm_hour = systime.wHour;
-
- if(pTz.DaylightBias!=0)
- res->tm_isdst = 1;
- else
- res->tm_isdst = 1;
+ res->tm_isdst = pTz.DaylightBias != 0;
int iLeap;
iLeap = (res->tm_year % 4 == 0 && (res->tm_year% 100 != 0 || res->tm_year % 400 == 0));