I guess that if you try to change it, then you might mess up the built-in timezone support coming with Rails The logic is: time gets stored in a neutral form in the DB and then it is automatically converted in the right timezone at display time
If you are asking that because you want to extract the time stored in the DB using a non-Rails app or just run queries, then you can take advantage of the Time Functions provided by MySQL (e.g. convert_tz()) hope this helps! luca On Thu, Oct 22, 2009 at 12:10 AM, LostyJai <[email protected]> wrote: > > Is there any way to change that to GMT+10? > > On Oct 21, 8:48 pm, Luca Faggioli <[email protected]> wrote: > > As far as I know dates stored in the DB by Rails are by default in UTC > > > > luca > > > > On Wed, Oct 21, 2009 at 1:34 AM, LostyJai <[email protected]> > wrote: > > > > > The created_at field for all the records in the database is about 10 > > > hours behind. However MySQL's `now()` command returns the correct > > > time, and so does `Time.new` in ruby. > > > > > In the environment.rb config file I have set: > > > > > config.time_zone = 'UTC +10:00' > > > config.time_zone = 'Sydney' > > > > > Any ideas? > > > > -- > > Luca Faggioli > > Openliven Srl > > follow me on Twitter:http://twitter.com/lfaggioli > > > -- Luca Faggioli Openliven Srl follow me on Twitter: http://twitter.com/lfaggioli --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "CommunityEngine" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/communityengine?hl=en -~----------~----~----~----~------~----~------~--~---
