TZInfo::PeriodNotFound for Santiago timezone from 2014-09-07 00:00:00 to 2014-09-07 00:59:59 #25

Closed
smetana opened this Issue Aug 12, 2014 · 1 comment

Comments

Projects
None yet
1 participant
@smetana

smetana commented Aug 12, 2014

Unable to use local time for Santiago timezone
between 2014-09-07 00:00:00 and 2014-09-07 00:59:59
TZInfo::PeriodNotFound is raised

Steps to reproduce

require 'rubygems'
require 'tzinfo'
tz = TZInfo::Timezone.get('America/Santiago')

local = tz.local_to_utc(Time.utc(2014,9,6,23,59,59)) # => OK
local = tz.local_to_utc(Time.utc(2014,9,7,1,0,0)) # =>  OK
local = tz.local_to_utc(Time.utc(2014,9,7,0,0,0)) # => TZInfo::PeriodNotFound

TZInfo::PeriodNotFound: TZInfo::PeriodNotFound
        from /usr/lib/ruby/gems/1.8/gems/tzinfo-1.2.2/lib/tzinfo/timezone.rb:390:in `period_for_local'
        from /usr/lib/ruby/gems/1.8/gems/tzinfo-1.2.2/lib/tzinfo/timezone.rb:474:in `local_to_utc'
        from /usr/lib/ruby/gems/1.8/gems/tzinfo-1.2.2/lib/tzinfo/time_or_datetime.rb:317:in `wrap'
        from /usr/lib/ruby/gems/1.8/gems/tzinfo-1.2.2/lib/tzinfo/timezone.rb:470:in `local_to_utc'
        from (irb):9
@smetana

This comment has been minimized.

Show comment
Hide comment
@smetana

smetana Aug 12, 2014

Just realized that September 7 between 00:00 and 1:00 does not exists because of DST. Sorry

smetana commented Aug 12, 2014

Just realized that September 7 between 00:00 and 1:00 does not exists because of DST. Sorry

@smetana smetana closed this Aug 12, 2014

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment