Time.use_zone('Pacific Time (US & Canada)') do p Time.zone.now end
I get the following: => Sun, 14 Apr 2013 20:30:53 PDT -07:00
However, when I do the Rails Time Zone Select ..., it clearly says -8:00 . Why is it -7 in one area and -8 in another?
In other cases, time zones, such as Hawaii , that -10:00 do not get an hour offset.
I suppose this has something to do with DST, but I'm more curious if that means it works correctly or incorrectly, and I need to do something else.
Ultimately, I use this in a datepicker, and it is very strange to me that when I use Time.zone.parse (along with my time zone around the filter), it compensates everything for 1 hour.
thanks
Edit
Here is the same problem I encountered with another piece of code
2.0.0-p0 :006 > 2.0.0-p0 :006 > u.meetups.in_future.first.meetup_time Meetup Load (0.4ms) SELECT `meetups`.* FROM `meetups` WHERE `meetups`.`user_id` = 1 AND (meetup_time >= '2013-04-23 04:46:48') ORDER BY meetup_time ASC LIMIT 1 => Tue, 23 Apr 2013 05:43:00 UTC 00:00 2.0.0-p0 :007 >
Note the inconsistency between the result and the where clause.
Edit
It seems that it works for CST correctly, but PST is disabled for ~ 1 hour ?? I feel that this is the same problem, I just miss a piece of the puzzle.