We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Today is 2013, 1, 8 but when I freeze the date for yesterday it reports the wrong date. Running ruby 1.9.3 and Timecop 0.5.8.
2013, 1, 8
require 'timecop' require 'date' Timecop.freeze(2013,1,7) do puts Date.today puts Time.now end
I expected to see:
2013-01-07 2013-01-07 00:00:00 -0500
But, I actually see:
2013-01-08 2013-01-07 00:00:00 -0500
Am I using this incorrectly?
The text was updated successfully, but these errors were encountered:
Timecop doesn't override Date#today but you can just do Time.now.to_date, e.g.
Date#today
Time.now.to_date
Timecop.freeze(Time.local(2013, 1, 7)) { puts Time.now.to_date } # 2013-01-07
Sorry, something went wrong.
No branches or pull requests
Today is
2013, 1, 8
but when I freeze the date for yesterday it reports the wrong date. Running ruby 1.9.3 and Timecop 0.5.8.I expected to see:
But, I actually see:
Am I using this incorrectly?
The text was updated successfully, but these errors were encountered: