Skip to content
New issue

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

Nanosecond fix #70

Closed

Conversation

stopdropandrew
Copy link
Contributor

The main goal here was to keep nanoseconds when using ActiveSupport. Turns out there was an issue with ActiveSupport (rails/rails#9403) that is the real cause. I've ported that workaround into Timecop for now.

Also added some tests and did a little refactor on TimeStackItem#parse_time. I'm not sure that the Timecop.active_support config variable is necessary now at all, but I didn't want to totally pull it out since I wasn't sure about the use case.

If you'd like to only take part of these changes, or want the commits squashed, let me know and I'll tweak it.

stopdropandrew added 3 commits February 25, 2013 08:46
causes Time#at to return incorrect results.
Explicitly call #utc before passing to Time#at.

rails/rails#9403

Also added some tests to ensure correct time zones
are returned.
for freezing an ActiveSupport::TimeWithZone.
@vanstee
Copy link

vanstee commented Mar 28, 2013

Bump bump. Running into this as well.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants