Closed bradgessler closed 2 years ago
Whew! Timezones in Ruby are fun.
Alright, here's the deal: I set this up to publish the news at 02:00 UTC. Prior to that time, the current issue will publish the prior days news.
Here's what that means for people like myself who live in the Pacific timezone:
On March 7 at 4:00 PM I'd see the news for "March 6" and a message telling me that "The March 7 issue will be published at 6:00 PM"
When 6:00 PM rolls around on March 7, the current issue would be published and I'd see "March 7" for the title of the news and the message at the bottom would tell me "The March 8 issue will be published tomorrow"
Because of the way content accumulates over the day before its published once, I need to make it clear to people who view the application externally and to my application code internally (caches, etc.) that the days news is published at 18:00 PST.
At the time of this writing, I'm seeing the news for "Saturday", which isn't correct. The news that should be displayed should be for Sunday. At 18:00 PST I'd publish the news for Monday. In a way, this publishes "yesterdays news" depending on your timezone, but this is essential for Legible News to show content without everything being "breaking".
local_time
gem