Posts about date
Date and time in ruby
Time.now will give you the current date (and time), like so:
Time.now 2012-11-22 22:35:01 +0000
You can also request all the date parts individually:
Time.now.hour 22 Time.now.min 35 Time.now.sec 01 Time.now.day 22 Time.now.month 11...
Change file modified and creation date/hour
Here's how to change a file's modified date:
touch -mt 201102260000 <file>
Where "201102260000" is year, month, day, hours, minutes all glued together (so 2011-02-26 at 00:00).
Also, if you want to change both the modified and creation...