I am running Rails 3.0.3. I am using the below line of code to generate a list of possible time zones. <%= form.time_zone_select :time_zone, ActiveSupport::TimeZone.us_zones %> However, the options at least for the US are off by one hour. It for example lists the Eastern Time zone as +5 relative to GMT however it should be +4. http://www.worldtimeserver.com/current_time_in_US-MI.aspx When I go to the console, it recognizes that given that I am in the eastern time zone, it is +4. irb(main):046:0> Time.now => Tue Apr 12 21:52:48 -0400 2011 irb(main):047:0> Time.now.utc => Wed Apr 13 01:52:55 UTC 2011 I do not recall running into such an issue on Rails 2.x on this app. However, it was never in production so perhaps it existed there also? -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
On 13 Apr 2011, at 02:55, "tashfeen.ekram" <tashfeen.ekram-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> I am running Rails 3.0.3. I am using the below line of code to > generate a list of possible time zones. > > <%= form.time_zone_select :time_zone, ActiveSupport::TimeZone.us_zones > %> > > However, the options at least for the US are off by one hour. It for > example lists the Eastern Time zone as +5 relative to GMT however it > should be +4.Is this because at the moment daylight savings time is in effect? Fred> http://www.worldtimeserver.com/current_time_in_US-MI.aspx > > When I go to the console, it recognizes that given that I am in the > eastern time zone, it is +4. > > irb(main):046:0> Time.now > => Tue Apr 12 21:52:48 -0400 2011 > irb(main):047:0> Time.now.utc > => Wed Apr 13 01:52:55 UTC 2011 > > I do not recall running into such an issue on Rails 2.x on this app. > However, it was never in production so perhaps it existed there also? > > -- > You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. > To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org > To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org > For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en. >-- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
On Wed, Apr 13, 2011 at 2:21 AM, Frederick Cheung < frederick.cheung-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> > > On 13 Apr 2011, at 02:55, "tashfeen.ekram" <tashfeen.ekram-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> > wrote: > > > I am running Rails 3.0.3. I am using the below line of code to > > generate a list of possible time zones. > > > > <%= form.time_zone_select :time_zone, ActiveSupport::TimeZone.us_zones > > %> > > > > However, the options at least for the US are off by one hour. It for > > example lists the Eastern Time zone as +5 relative to GMT however it > > should be +4. > > Is this because at the moment daylight savings time is in effect? > > Fred > >I would think so. Given that East Coast is -5 GMT always and is just adjusted forward if DST is honored. There are some places in the US where it is not honored. B. -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
OK. So, it will always display times on the select menu according to standard time? I just thought since we are in day light savings time which would make the Eastern time zone is GMT -4, it should say GMT -4 rather than GMT -5 which is what it is in standard time. Basically, it does not actually adjust? On Apr 14, 9:15 am, Bryan Crossland <bacrossl...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> On Wed, Apr 13, 2011 at 2:21 AM, Frederick Cheung < > > > > > > frederick.che...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > > > On 13 Apr 2011, at 02:55, "tashfeen.ekram" <tashfeen.ek...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> > > wrote: > > > > I am running Rails 3.0.3. I am using the below line of code to > > > generate a list of possible time zones. > > > > <%= form.time_zone_select :time_zone, ActiveSupport::TimeZone.us_zones > > > %> > > > > However, the options at least for the US are off by one hour. It for > > > example lists the Eastern Time zone as +5 relative to GMT however it > > > should be +4. > > > Is this because at the moment daylight savings time is in effect? > > > Fred > > I would think so. Given that East Coast is -5 GMT always and is just > adjusted forward if DST is honored. There are some places in the US where it > is not honored. > > B.-- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
As it seems like TimeZone has been depreciated (http://apidock.com/ rails/TimeZone). what is the time zone library that should be used? Should we be using TZinfo? On Apr 15, 12:44 pm, "tashfeen.ekram" <tashfeen.ek...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> OK. So, it will always display times on the select menu according to > standardtime? I just thought since we are in day light savingstime > which would make the Easterntimezoneis GMT -4, it should say GMT -4 > rather than GMT -5 which is what it is in standardtime. Basically, it > does not actually adjust? > > On Apr 14, 9:15 am, Bryan Crossland <bacrossl...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > > > > > On Wed, Apr 13, 2011 at 2:21 AM, Frederick Cheung < > > > frederick.che...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > > > > On 13 Apr 2011, at 02:55, "tashfeen.ekram" <tashfeen.ek...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> > > > wrote: > > > > > I am running Rails 3.0.3. I am using the below line of code to > > > > generate a list of possibletimezones. > > > > > <%= form.time_zone_select :time_zone, ActiveSupport::TimeZone.us_zones > > > > %> > > > > > However, the options at least for the US are off by one hour. It for > > > > example lists the EasternTimezoneas +5 relative to GMT however it > > > > should be +4. > > > > Is this because at the moment daylight savingstimeis in effect? > > > > Fred > > > I would think so. Given that East Coast is -5 GMT always and is just > > adjusted forward if DST is honored. There are some places in the US where it > > is not honored. > > > B.-- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
I take that back. It does not seem like it is depreciated as it is in the latest rails docs... On Apr 19, 11:05 am, "tashfeen.ekram" <tashfeen.ek...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> As it seems like TimeZone has been depreciated (http://apidock.com/ > rails/TimeZone). what is the time zone library that should be used? > > Should we be using TZinfo? > > On Apr 15, 12:44 pm, "tashfeen.ekram" <tashfeen.ek...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> > wrote: > > > > > OK. So, it will always display times on the select menu according to > > standardtime? I just thought since we are in day light savingstime > > which would make the Easterntimezoneis GMT -4, it should say GMT -4 > > rather than GMT -5 which is what it is in standardtime. Basically, it > > does not actually adjust? > > > On Apr 14, 9:15 am, Bryan Crossland <bacrossl...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > > > > On Wed, Apr 13, 2011 at 2:21 AM, Frederick Cheung < > > > > frederick.che...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > > > > > On 13 Apr 2011, at 02:55, "tashfeen.ekram" <tashfeen.ek...-Re5JQEeQqe8@public.gmane.orgm> > > > > wrote: > > > > > > I am running Rails 3.0.3. I am using the below line of code to > > > > > generate a list of possibletimezones. > > > > > > <%= form.time_zone_select :time_zone, ActiveSupport::TimeZone.us_zones > > > > > %> > > > > > > However, the options at least for the US are off by one hour. It for > > > > > example lists the EasternTimezoneas +5 relative to GMT however it > > > > > should be +4. > > > > > Is this because at the moment daylight savingstimeis in effect? > > > > > Fred > > > > I would think so. Given that East Coast is -5 GMT always and is just > > > adjusted forward if DST is honored. There are some places in the US where it > > > is not honored. > > > > B.-- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.