Hi, I have to use Hawaii''s time zone which is UTC-10 for my created_at. Can anyone tell me how can I solve this problem? Thanks, Tushar -- Posted via http://www.ruby-forum.com/. -- 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 24 March 2010 10:39, Tushar Gandhi <lists-fsXkhYbjdPsEEoCn2XhGlw@public.gmane.org> wrote:> Hi, > I have to use Hawaii''s time zone which is UTC-10 for my created_at. > Can anyone tell me how can I solve this problem?Times should generally always be stored in UTC, then there is no confusion about the time. Display it in the local timezone when display is required. Colin -- 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.
Yes, I agreed. But still I need to store the date in Hawai timezone. How can I set the time zone for Time.now? Thanks, Tushar Colin Law wrote:> On 24 March 2010 10:39, Tushar Gandhi <lists-fsXkhYbjdPsEEoCn2XhGlw@public.gmane.org> wrote: >> Hi, >> I have to use �Hawaii''s time zone which is UTC-10 for my created_at. >> Can anyone tell me how can I solve this problem? > > Times should generally always be stored in UTC, then there is no > confusion about the time. Display it in the local timezone when > display is required. > > Colin-- Posted via http://www.ruby-forum.com/. -- 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.
On 25 March 2010 03:30, Tushar Gandhi <lists-fsXkhYbjdPsEEoCn2XhGlw@public.gmane.org> wrote:> Yes, I agreed. But still I need to store the date in Hawai timezone. > How can I set the time zone for Time.now?That is not the same question. google for rails time zone will provide useful links such as http://mad.ly/2008/04/09/rails-21-time-zone-support-an-overview/ Colin> Thanks, > Tushar > Colin Law wrote: >> On 24 March 2010 10:39, Tushar Gandhi <lists-fsXkhYbjdPsEEoCn2XhGlw@public.gmane.org> wrote: >>> Hi, >>> I have to use �Hawaii''s time zone which is UTC-10 for my created_at. >>> Can anyone tell me how can I solve this problem? >> >> Times should generally always be stored in UTC, then there is no >> confusion about the time. Display it in the local timezone when >> display is required. >> >> Colin > > -- > Posted via http://www.ruby-forum.com/. > > -- > 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. > >-- 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.