diff --git a/test/ruby/test_time_tz.rb b/test/ruby/test_time_tz.rb index 8e60cf44c5..21ac667281 100644 --- a/test/ruby/test_time_tz.rb +++ b/test/ruby/test_time_tz.rb @@ -156,6 +156,12 @@ class TestTimeTZ < Test::Unit::TestCase } end + def test_asia_kuala_lumpur + with_tz(tz="Asia/Kuala_Lumpur") { + assert_time_constructor(tz, "1933-01-01 00:20:00 +0720", :local, [1933]) + } + end + def test_canada_newfoundland with_tz(tz="America/St_Johns") { assert_time_constructor(tz, "2007-11-03 23:00:59 -0230", :new, [2007,11,3,23,0,59,:dst]) diff --git a/time.c b/time.c index 3bbfce6b38..75db5540c9 100644 --- a/time.c +++ b/time.c @@ -3273,12 +3273,12 @@ find_time_t(struct tm *tptr, int utc_p, time_t *tp) *tp = guess_lo + ((tptr->tm_year - tm_lo.tm_year) * 365 + - ((tptr->tm_year-69)/4) - - ((tptr->tm_year-1)/100) + - ((tptr->tm_year+299)/400) - - ((tm_lo.tm_year-69)/4) + - ((tm_lo.tm_year-1)/100) - - ((tm_lo.tm_year+299)/400) + + DIV((tptr->tm_year-69), 4) - + DIV((tptr->tm_year-1), 100) + + DIV((tptr->tm_year+299), 400) - + DIV((tm_lo.tm_year-69), 4) + + DIV((tm_lo.tm_year-1), 100) - + DIV((tm_lo.tm_year+299), 400) + tptr_tm_yday - tm_lo.tm_yday) * 86400 + (tptr->tm_hour - tm_lo.tm_hour) * 3600 + diff --git a/version.h b/version.h index d8a02182c2..4c8fd6407b 100644 --- a/version.h +++ b/version.h @@ -1,10 +1,10 @@ #define RUBY_VERSION "2.6.6" #define RUBY_RELEASE_DATE RUBY_RELEASE_YEAR_STR"-"RUBY_RELEASE_MONTH_STR"-"RUBY_RELEASE_DAY_STR -#define RUBY_PATCHLEVEL 123 +#define RUBY_PATCHLEVEL 124 #define RUBY_RELEASE_YEAR 2019 #define RUBY_RELEASE_MONTH 12 -#define RUBY_RELEASE_DAY 15 +#define RUBY_RELEASE_DAY 18 #include "ruby/version.h"