summaryrefslogtreecommitdiff
path: root/time.c
diff options
context:
space:
mode:
authormatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2001-04-06 05:42:43 +0000
committermatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2001-04-06 05:42:43 +0000
commit0c176f00c12c32bbfa2d197fd9bf2f2c81c1573d (patch)
tree4a147a1436c047ffa126e887ab3684fbe999e1c9 /time.c
parent2c29a1c0e9ab81f993e2391a80c2c12cdca458dd (diff)
* variable.c (rb_const_get): no recursion to show full class path
for modules. * eval.c (rb_set_safe_level): should set safe level in curr_thread as well. * eval.c (safe_setter): ditto. * object.c (rb_obj_is_instance_of): nil belongs to false, not true. * time.c (make_time_t): proper (I hope) daylight saving time handling for both US and Europe. I HATE SUMMER TIME! * eval.c (rb_thread_wait_for): non blocked signal interrupt should stop the interval. * class.c (rb_mod_clone): should copy method bodies too. * bignum.c (bigdivrem): should trim trailing zero bdigits of remainder, even if dd == 0. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_6@1307 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'time.c')
-rw-r--r--time.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/time.c b/time.c
index b7c4b94add..c03d7e5424 100644
--- a/time.c
+++ b/time.c
@@ -352,8 +352,13 @@ make_time_t(tptr, utc_or_local)
}
tm = localtime(&guess);
if (!tm) goto error;
- if (tptr->tm_hour != tm->tm_hour) {
- guess -= 3600;
+ if (lt.tm_isdst != tm->tm_isdst || tptr->tm_hour != tm->tm_hour) {
+ oguess = guess - 3600;
+ tm = localtime(&oguess);
+ if (!tm) goto error;
+ if (tptr->tm_hour == tm->tm_hour) {
+ guess = oguess;
+ }
}
if (guess < 0) {
goto out_of_range;