Skip to content

Instantly share code, notes, and snippets.

@carmelyne
Created May 7, 2009 16:29
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save carmelyne/108195 to your computer and use it in GitHub Desktop.
Save carmelyne/108195 to your computer and use it in GitHub Desktop.
Loading development environment (Rails 2.3.2)
>> @now = Time.zone.now
=> Thu, 07 May 2009 09:24:13 PDT -07:00
>> @now.strftime("%m/%d/%Y")
=> "05/07/2009"
>> @now.strftime("%Y/%m/%d")
=> "2009/05/07"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment