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

Add tests and handling for negative timestamps #252

Merged
merged 1 commit into from
Jul 28, 2018

Conversation

quodlibetor
Copy link
Contributor

No description provided.

@quodlibetor
Copy link
Contributor Author

Currently this is failing with:

---- src/naive/datetime.rs - naive::datetime::NaiveDateTime::timestamp_millis (line 281) stdout ----
        thread 'rustc' panicked at 'test executable failed:

thread 'main' panicked at 'assertion failed: `(left == right)`
  left: `-43200900`,
 right: `-900`', src/naive/datetime.rs:13:1
note: Run with `RUST_BACKTRACE=1` for a backtrace.

', librustdoc/test.rs:341:17
note: Run with `RUST_BACKTRACE=1` for a backtrace.

---- src/naive/datetime.rs - naive::datetime::NaiveDateTime::timestamp (line 250) stdout ----
        thread 'rustc' panicked at 'test executable failed:

thread 'main' panicked at 'assertion failed: `(left == right)`
  left: `-43201000`,
 right: `-1`', src/naive/datetime.rs:13:1
note: Run with `RUST_BACKTRACE=1` for a backtrace.

@quodlibetor quodlibetor mentioned this pull request Jul 19, 2018
@quodlibetor quodlibetor force-pushed the negative-timestamps branch from 4253bc6 to a58a833 Compare July 28, 2018 20:40
@quodlibetor
Copy link
Contributor Author

🤕 the tests were failing because I was using 11 to refer to 11pm, when obviously that is 11am. 😢

On the plus side, this has always worked, and now it's documented better and the variables I think make the code a bit more clear.

@quodlibetor quodlibetor merged commit 369ce72 into chronotope:master Jul 28, 2018
@quodlibetor quodlibetor deleted the negative-timestamps branch July 28, 2018 21:07
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.

1 participant