Skip to content

Instantly share code, notes, and snippets.

@lmarburger
Created May 27, 2010 18:05
Show Gist options
  • Save lmarburger/416133 to your computer and use it in GitHub Desktop.
Save lmarburger/416133 to your computer and use it in GitHub Desktop.
# 0.3.4
> require 'timecop'
=> []
> Timecop.freeze DateTime.new(2010, 1, 1)
=> Thu Dec 31 20:00:00 -0500 2009
> Time.now
=> Thu Dec 31 20:00:00 -0500 2009
> Time.now.utc
=> Fri Jan 01 01:00:00 UTC 2010
> Time.now
=> Fri Jan 01 01:00:00 UTC 2010
# 0.3.1
> require 'timecop'
=> []
> Timecop.freeze DateTime.new(2010, 1, 1)
=> Fri, 01 Jan 2010 00:00:00 EST -05:00
> Time.now
=> Fri, 01 Jan 2010 00:00:00 EST -05:00
> Time.now.utc
=> Fri Jan 01 05:00:00 UTC 2010
> Time.now
=> Fri, 01 Jan 2010 00:00:00 EST -05:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment