0

I using some side api on my server what written in Ruby, and I found problem that timezone in Ruby app is different from my (on server sets proper timezone), I try to find solution how to configure it (like in php.ini) but I only getting results to set it in code. Can somebody tell me can I configure it like in PHP, e.g. in some ruby.ini file? Thanks!

nowiko
  • 2,507
  • 6
  • 38
  • 82

1 Answers1

0

Ruby gets the time zone information from the host's operating system. So you can either:

  • Change the time zone on your OS, or
  • Set the TZ environment variable. Eg.

    ENV['TZ'] = 'US/Eastern'

source

Community
  • 1
  • 1
shivam
  • 16,048
  • 3
  • 56
  • 71