1

In Rails it's easy to set default time zone. I just need to add config.time_zone = 'Tokyo' in config file.

How can I configure same way in pure ruby?

I mean "outside of Rails", of course it's OK to use some Gems like ActiveSupport or something else.

ironsand
  • 14,329
  • 17
  • 83
  • 176
  • Also a duplicate of http://stackoverflow.com/questions/4703830. – sawa Mar 17 '16 at 12:10
  • 2
    Notice that using `ENV["TZ"]`, `"Tokyo"` will not work, as it is not a correct time zone. You have to do `ENV["TZ"] = "Asia/Tokyo"`. – sawa Mar 17 '16 at 12:11

0 Answers0