Skip to content

Instantly share code, notes, and snippets.

@jtrupiano
Created January 15, 2010 13:40
Show Gist options
  • Save jtrupiano/278066 to your computer and use it in GitHub Desktop.
Save jtrupiano/278066 to your computer and use it in GitHub Desktop.
Demonstrate use of ENV['TZ'] to change time zone
john-mbp:playground john$ irb
irb(main):001:0> Time.now
=> Fri Jan 15 08:40:05 -0500 2010
irb(main):002:0> ENV['TZ'] = 'GMT'
=> "GMT"
irb(main):003:0> Time.now
=> Fri Jan 15 13:40:11 +0000 2010
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment