By default, DataMapper creates DateTime properties of type timestamp without time zone
in PostgreSQL. I'开发者_高级运维d like to change that default for my project to timestamp with time zone
. How can this be done?
Just set ENV['TZ'] = 'your timezone'
just in case some jruby users pass by:
you need to set ENV['TZ'] = 'your timezone' and
org.joda.time.DateTimeZone.setDefault(org.joda.time.DateTimeZone.forID('your timezone'))
'UTC' works fine for me. for other timezone you might need to dig into joda-time.
精彩评论