Question
By default, the Chronic gem uses the system timezone as the default timezone.
They mention here (https://github.com/mojombo/chronic#time-zones), that I can use ActiveSupports Time.zone to change this. But i'm not using Rails, i'm using Sinatra and including active support just to utilize the timezone class seems unnecessary.
How else can I do this?
What i'm trying to do.
I'm using Chronic for system reporting / dashboards and stats.
The servers are storing timestamps in the created_at fields in the DB at utc time. But of course we run our reports as PDT.
I want to set the default timezone to America/Los_Angeles. So that:
d = Chronic.parse("1 days ago at midnight")
date = d.localtime #Should give me a date like "2013-05-27 00:00:00"
utc_date = date.utc #Should give me a date like "2013-05-27 07:00:00"
How can I accomplish this?