views:

244

answers:

2

Does anyone know how i can use BST for config.time_zone in my rails config/environment.rb file?

At the moment i have left it as UTC and i'm thinking of adding BST to the list of supported timezones, and then extending the Time class to respect this (> last sunday of X month + 1hr)

Where can i find the list of supported timezones?

Searching around i have found alot of complaints but not alot of answers. this will be up on guthub asap.

Cheers, Dougle

+1  A: 
rake time:zones:all

You'll probably see a time zone named London, which is just UTC +00:00, but should handle UK daylight saving time properly.

molf
Unfortunately 'London' is still coming out an hour early, i guess it's an alias of UTC the same as GMT was
Question Mark
Wait no, you were right London does use BST, i was looking at the sql queries in the log which are of course UTC only, Cheers molf
Question Mark
A: 

The TimeZone you need to set is UK, this will automatically handle BST

Time.zone = 'UK'
Time.zone.now
 => Sun, 17 Oct 2010 02:09:54 BST +01:00
MatthewFord