diff options
author | matz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2001-05-15 08:49:23 +0000 |
---|---|---|
committer | matz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2001-05-15 08:49:23 +0000 |
commit | be256c6f5a0180ac3eef05075f8b3977d29dfcb7 (patch) | |
tree | 80b8fb91a7a668c70f42757bfc8d563bf63242ba /time.c | |
parent | 91fdbecbdaa25387e19050dbf9234d245c8246b8 (diff) |
* array.c (rb_ary_and): should not push frozen key string.
* array.c (rb_ary_or): ditto.
* eval.c (rb_thread_schedule): should save context before raising
deadlock, saved context for current thread might be obsolete.
* time.c (make_time_t): non DST timezone shift supported (hopefully).
* signal.c: SIGINFO added.
* eval.c (rb_ensure): should not SEGV when prot_tag is NULL.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_6@1395 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'time.c')
-rw-r--r-- | time.c | 14 |
1 files changed, 11 insertions, 3 deletions
@@ -353,11 +353,19 @@ make_time_t(tptr, utc_or_local) tm = localtime(&guess); if (!tm) goto error; if (lt.tm_isdst != tm->tm_isdst || tptr->tm_hour != tm->tm_hour) { - oguess = guess - 3600; - tm = localtime(&oguess); + time_t tmp = guess - 3600; + tm = localtime(&tmp); if (!tm) goto error; if (tptr->tm_hour == tm->tm_hour) { - guess = oguess; + guess = tmp; + } + else if (lt.tm_isdst == tm->tm_isdst) { + tmp = guess + 3600; + tm = localtime(&tmp); + if (!tm) goto error; + if (tptr->tm_hour == tm->tm_hour) { + guess = tmp; + } } } if (guess < 0) { |