summaryrefslogtreecommitdiff
path: root/time.c
diff options
context:
space:
mode:
authornaruse <naruse@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2015-01-16 16:53:16 +0000
committernaruse <naruse@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2015-01-16 16:53:16 +0000
commitd022e13fd192e526552ae1982d9bacb86d3cd1a8 (patch)
tree00e53064e90947c3c8e6b7724d97fea6b59185d3 /time.c
parent13cea1f30d429c563961ce7a36fee947ca5cb429 (diff)
merge revision(s) 49162: [Backport #10698]
* time.c (timelocalw): Set tm_isdst field -1 if vtm->isdst is VTM_ISDST_INITVAL. This bug is introduced at packing struct vtm (r45155). [ruby-core:67345] [Bug #10698] Reported by Boris Ruf. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_2@49284 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'time.c')
-rw-r--r--time.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/time.c b/time.c
index ddd27ca8dd..044a049981 100644
--- a/time.c
+++ b/time.c
@@ -1548,7 +1548,7 @@ timelocalw(struct vtm *vtm)
tm.tm_hour = vtm->hour;
tm.tm_min = vtm->min;
tm.tm_sec = vtm->sec;
- tm.tm_isdst = vtm->isdst;
+ tm.tm_isdst = vtm->isdst == VTM_ISDST_INITVAL ? -1 : vtm->isdst;
if (find_time_t(&tm, 0, &t))
goto no_localtime;