I am here on Ubuntu 12.04 and I see:
$ cat /etc/timezone America/Phoenix
Accordingly, Time will return time with a non-UTC zone:
$ irb > Time.now => 2013-03-27 13:44:49 -0700 > Time.at 0 => 1969-12-31 17:00:00 -0700
I can override the system time zone using the TZ environment variable:
$ TZ=UTC irb > Time.now => 2013-03-27 20:47:19 +0000 > Time.at 0 => 1970-01-01 00:00:00 +0000
Anyway, can I make this change programmatically, as part of the Ruby process?
timezone ruby environment-variables
dukedave
source share