Blog2016 ≫ Damn you tzinfo

All my home automation has stopped working since the clocks went forward, gah now my TV is not turning itself off part way through a late night programme any more! Clare is pleased, but I am annoyed. It's all down to the time zone being different, think I must have changed my ruby code since the last time zone change and am now using a gem that needs time zones to be handled.

$ [lightwaverf](/wiki/#lightwaverf) update_timers 120 360
"-- Updating timers..."
.../ri_cal/component/timezone.rb:106:in `period_for_local': TZInfo::PeriodNotFound (TZInfo::PeriodNotFound)
from .../ri_cal/component/timezone.rb:31:in `rational_utc_offset'
from .../ri_cal/property_value/date_time/timezone_support.rb:61:in `rational_tz_offset'
from .../ri_cal/property_value/date_time.rb:312:in `[ruby_value](/wiki/#ruby)'
from .../ri_cal/component/event.rb:44:in `finish_time'
from .../ri_cal/occurrence_enumerator.rb:202:in `before_range?'
from .../ri_cal/occurrence_enumerator.rb:101:in `before_start?'
from .../ri_cal/occurrence_enumerator.rb:143:in `each'
from .../ri_cal/occurrence_enumerator.rb:173:in `to_a'
from .../ri_cal/occurrence_enumerator.rb:173:in `to_a'
from .../ri_cal/occurrence_enumerator.rb:193:in `occurrences'
from .../gems/lightwaverf-0.12.3/lib/lightwaverf.rb:879:in `block in update_timers'
from .../gems/lightwaverf-0.12.3/lib/lightwaverf.rb:878:in `each'
from .../gems/lightwaverf-0.12.3/lib/lightwaverf.rb:878:in `update_timers'
from .../gems/lightwaverf-0.12.3/bin/lightwaverf:24:in `<top (required)>'
from /usr/local/bin/lightwaverf:23:in `load'
from /usr/local/bin/lightwaverf:23:in `<main>'

I must say I much prefer the npm ecosystem to anything else like this I've worked with, these dependencies would be managed nicely there.

💬 Aha resolved the tzinfo thing

⬅️ :: ➡️

Paul Clarke's blog - I live in Hythe near Folkestone. Married to Clare + dad to two, I am a full-stack web developr, and I do js / Node, some ruby, python, php ect ect. I like pubs, parkrun, eating, home automation and other diy stuff, history, family tree stuff, TV, squirrels, pirates, lego, + TIME TRAVEL.