Skip to content
This repository has been archived by the owner on May 28, 2022. It is now read-only.

🚌 time off by an hour on planck #65

Open
stephenyeargin opened this issue Oct 27, 2017 · 3 comments
Open

🚌 time off by an hour on planck #65

stephenyeargin opened this issue Oct 27, 2017 · 3 comments
Labels

Comments

@stephenyeargin
Copy link
Member

Betting it is a DST bug. Works on My Machineâ„¢, of course.

screen shot 2017-10-27 at 3 40 13 pm

Above screenshot taken at 3:40. Actual arrival is 3:55, not 4:55.

/cc @jameswhite

@stephenyeargin stephenyeargin changed the title Off by an hour on planck 🚌 time off by an hour on planck Oct 27, 2017
@jameswhite
Copy link
Contributor

Shopify/dashing#398

@stephenyeargin
Copy link
Member Author

stephenyeargin commented Oct 27, 2017

We used to bring in ActiveSupport to get some better timezone/DST handling, but that was stripped out to make the dashboards able to run on Flynn. Dunno if we bootstrap that back in, but wanted to note that this particular issue isn't 🆕. It was broken before the countdown was introduced.

I had attempted to fix it with:

# Ugly hack to avoid using ActiveSupport
timezone_offset = DateTime.now.offset.to_s == '-5/24' ? '-05:00' : '-06:00'
{
countdown: DateTime.parse('today at ' + data['next']['arrival_time'] + timezone_offset),
moreinfo: "Route ##{data['route']['route_id']} / " \
"#{data['route']['route_long_name']} leaves from #{data['stop_name']}"
}

That didn't fix it.

@stephenyeargin
Copy link
Member Author

Definitely related to the time change, as it is currently working.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

2 participants