Closed jmettraux closed 3 years ago
2021-09-05 00:00:00
in America/Santiago
is right on the transition to DST (https://www.timeanddate.com/time/zone/chile/santiago) hence TzInfo failing.
class ::TzINFO::TimeZone
# ...
def period_for_local(local_time, dst = Timezone.default_dst)
raise ArgumentError, 'local_time must be specified' unless local_time
local_time = Timestamp.for(local_time, :ignore)
results = periods_for_local(local_time)
if results.empty?
raise PeriodNotFound, "#{local_time.strftime('%Y-%m-%d %H:%M:%S')} is an invalid local time." # <----
elsif results.size < 2
results.first
else
# ambiguous result try to resolve
Nothing to do with Active Support Time.zone
. Back to fugit.
https://github.com/floraison/fugit/issues/62
Weird: OP uses Active Support
Time.zone = xxx
but et-orbi doesn't seem to readTime.zone