summaryrefslogtreecommitdiff
path: root/test/ruby/test_time_tz.rb
AgeCommit message (Collapse)Author
2021-03-20merge revision(s) ↵nagachika
276f6a225d18561cbe5282b798cb4e416c66079f,95bef7b69a6fb42687a6200b338060be307259f5: [Backport #17352] Don't double fractional seconds when passing timezone object to Time.new I found that fractional seconds were doubled when using the timezone feature of Time in Sequel's named_timezones extension (which uses TZInfo for the timezone object), and traced the problem to this code. There is no subsecx being modified in the utc_to_local call below this, and I'm not sure why you would want to add in the fractional seconds unless you assumed the timezone conversion would drop the existing fractional seconds (TZInfo doesn't drop fractional seconds). --- test/ruby/test_time_tz.rb | 10 ++++++++++ 1 file changed, 10 insertions(+) Subsecond of Time::tm should be 0 --- time.c | 1 + 1 file changed, 1 insertion(+)
2020-07-23merge revision(s) 99a9c3fe2eaab8157765d792dc871da6daea0327: [Backport #17024]nagachika
Fixed yday and wday with timezone [Bug #17024]
2019-12-17Added a test for [Bug #16159]Nobuyoshi Nakada
2019-08-20Enable more Time TZ tests on OpenBSDJeremy Evans
2019-07-29Removed unused variables and methodsNobuyoshi Nakada
2019-07-27Initialize DST flagNobuyoshi Nakada
* time.c (zone_timelocal): initialize DST flag by asking the timezone object. [Bug #15988]
2019-06-29Rmove old TestTimeTZ::TZ#abbr attributeNobuyoshi Nakada
2019-04-19time.c: added in: option to Time.nownobu
* time.c (time_s_now): added in: option to Time.now as well as Time.at. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@67613 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2019-01-07time.c: support military time zone namesnobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@66747 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2019-01-07time.c: UTC and Z timezones should be utcnobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@66746 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-11-28time.c: rescue find_timezone when loadingnobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@66080 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-11-28Try with TZInfo and Timezone gemsnobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@66079 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-11-28Time.at in: tznobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@66078 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-11-28Timezone at Time.atnobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@66077 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-11-28Try Time.find_timezone to convert name to timezonenobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@66076 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-11-28Try Time.find_timezone to loadnobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@66075 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-10-28time.c: added Time::TM#+ and Time::TM#-nobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@65421 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-10-26Update for tzdata-2018fnobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@65365 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-10-22time.c: optional arguments of Time::TM#initializenobu
* time.c (tm_initialize): arguments other than year are optional now as Time.new. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@65296 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-10-21test_time_tz.rb: refactor dummy TZ tests and add another timezonenobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@65293 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-10-12Load as FIXOFF mode if zone is presentnobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@65025 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-10-09Add tests for another timezonenobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64977 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-10-08Add test for marshalnobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64961 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-10-08Removed redundant suffix `_with_timezone`nobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64960 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-10-08Timezone at Time#+ and Time#-nobu
* time.c (time_add): support for Timezone. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64958 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-10-08Timezone support by Time [Feature #14850]nobu
* strftime.c (rb_strftime): support timezone object by `%z`. * time.c (time_init_1, time_new_timew, time_getlocaltime): accept timezone object as `off`. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64952 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-07-16No one knows how many leap seconds in year 2100naruse
Just check whether leep seconds are considered or not. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63979 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-07-05Re-apply r63848 (Optimize Time.utc)naruse
* Both timegmw and gmtimew ignores leap second if the timezone doesn't have leap seconds on the first call of init_leap_second_info() * Add Bug::Time.reset_leap_second_info for testing git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63857 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-07-03skip test_localtime_zone if force_tz_test is falsenaruse
For example Solaris https://rubyci.org/logs/rubyci.s3.amazonaws.com/unstable10x/ruby-trunk/log/20180703T091803Z.fail.html.gz git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63839 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-07-02time.c: [DOC] Time#localtimenobu
* time.c: state that Time#localtime does nothing when nothing changes. [ruby-core:87675] [Bug #14880] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63823 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-04-01test_time_tz.rb: Lisbon tzdata fixnobu
* test/ruby/test_time_tz.rb (gen_variational_zdump_test): Update Lisbon zdump data, which fixed the 1912-01-01 transition for Portugual and its colonies. [Bug #14655] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63056 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-04-01test_time_tz.rb: Kiritimati tzdata fixnobu
* test/ruby/test_time_tz.rb (gen_zdump_test): fix the expected data at the Kiritimati's skip of New Year's Eve 1994. [Bug #14655] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63055 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-04-01test_time_tz.rb: Kiritimati tzdata fixnobu
* test/ruby/test_time_tz.rb (TestTimeTZ#test_pacific_kiritimati): fix the expected data at the skip of New Year's Eve 1994. [Bug #14655] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63054 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-02-21test_time_tz.rb: past Japanese DST tzdata fixnobu
* test/ruby/test_time_tz.rb (TestTimeTZ#test_asia_tokyo): fix the expected data at the end of DST. [Bug #14438] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62508 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-02-21test_time_tz.rb: past Japanese DST tzdata fixnobu
* test/ruby/test_time_tz.rb (TestTimeTZ#test_asia_tokyo): follow the tzdata 2018 fix of Japanese DST transitions (1948-1951). [ruby-core:85373] [Bug #14438] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62506 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-07-26test: use assert_includenobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@55757 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-04-22* test/ruby/test_time_tz.rb: Tests depends on Europe/Moscow removedakr
to avoid test failures due to the tzdata change. https://github.com/eggert/tz/commit/8ee11a301cf173afb0c76e0315b9f9ec8ebb9d95 Found by naruse. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@54706 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-12-16Add frozen_string_literal: false for all filesnaruse
When you change this to true, you may need to add more tests. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@53141 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-02-22* time.c: zone encoding should be US-ASCII if all 7-bits. Fix r46907.eregon
* test/ruby/test_time.rb, test/ruby/test_time_tz.rb: Update tests. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49693 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-01-06Refine an assertion message.akr
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49163 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-01-06* time.c (timelocalw): Set tm_isdst field -1 if vtm->isdst isakr
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/trunk@49162 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-09-22* test/ruby/test_time_tz.rb: Fix test error with tzdata-2014g.akr
[ruby-core:65058] [Bug #10245] Reported by Vit Ondruch. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47680 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-09-08test_time_tz.rb: have_tz_offset?nobu
* test/ruby/test_time_tz.rb (TestTimeTZ::Util#have_tz_offset?): append ?-suffix as a predicate method. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47452 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-09-08test_time_tz.rb: right timezonenobu
* test/ruby/test_time_tz.rb (has_right_tz): check if right timezones are installed. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47451 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-08-18test_time_tz.rb: has_lisbon_tznobu
* test/ruby/test_time_tz.rb (has_lisbon_tz): separate from has_right_tz. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47212 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-08-09* test/minitest/test_minitest_unit.rb: removed obsoleted conditionhsbt
for Ruby 1.8. * test/ruby/test_time_tz.rb: ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47111 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-03-05* test/ruby: get rid of warnings.usa
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@45273 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-12-07Add freebsd to force_tz_testnaruse
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@38246 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-12-07Canada/Newfoundland was renamed to America/St_Johnsnaruse
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@38245 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-04-18* test/ruby/test_time_tz.rb (TestTimeTZ): run TZ tests on Mac OS X,nobu
except for "right" timezonez. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35386 b2dd03c8-39d4-4d8f-98ff-823fe69b080e