Skip to content

Instantly share code, notes, and snippets.

@pdswan
Created April 10, 2013 15:19
Show Gist options
  • Save pdswan/5355552 to your computer and use it in GitHub Desktop.
Save pdswan/5355552 to your computer and use it in GitHub Desktop.
Forcing jruby to use UTC for everything
ENV['TZ'] = 'UTC'
if RUBY_PLATFORM =~ /java/
org.joda.time.DateTimeZone.setDefault(org.joda.time.DateTimeZone::UTC)
java.util.TimeZone.setDefault(java.util.TimeZone.getTimeZone('UTC'))
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment