From 9cff70bd04ceabcfb35ea43bcc8af20b82a202e3 Mon Sep 17 00:00:00 2001 From: Kang Seonghoon Date: Fri, 15 May 2015 02:17:31 +0900 Subject: [PATCH] 0.2.14: fixed a subtle bug in `Naive(Date)Time` addition. - `NaiveDateTime +/- Duration` or `NaiveTime +/- Duration` could have gone wrong when the `Duration` to be added is negative and has a fractional second part. This was caused by an underflow in the conversion from `Duration` to the parts; the lack of tests for this case allowed a bug. A regression test has been added to avoid further bugs. (#37) --- CHANGELOG.md | 9 +++++++++ Cargo.toml | 2 +- README.md | 4 ++-- src/lib.rs | 4 ++-- 4 files changed, 14 insertions(+), 5 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 22c32f5..bdcbc74 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -8,6 +8,15 @@ Chrono obeys the principle of [Semantic Versioning](http://semver.org/). There were/are numerous minor versions before 1.0 due to the language changes. Versions with only mechnical changes will be omitted from the following list. +## 0.2.14 (2015-05-15) + +### Fixed + +- `NaiveDateTime +/- Duration` or `NaiveTime +/- Duration` could have gone wrong + when the `Duration` to be added is negative and has a fractional second part. + This was caused by an underflow in the conversion from `Duration` to the parts; + the lack of tests for this case allowed a bug. (#37) + ## 0.2.13 (2015-04-29) ### Added diff --git a/Cargo.toml b/Cargo.toml index ac5c4ee..c159223 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "chrono" -version = "0.2.13" +version = "0.2.14" authors = ["Kang Seonghoon "] description = "Date and time library for Rust" diff --git a/README.md b/README.md index 04902db..8cf54b4 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -[Chrono][doc] 0.2.13 +[Chrono][doc] 0.2.14 ==================== [![Chrono on Travis CI][travis-image]][travis] @@ -38,7 +38,7 @@ Or in the case you are using Rust 1.0 beta, pin the exact version: ```toml [dependencies] -chrono = "=0.2.13" +chrono = "=0.2.14" ``` And put this in your crate root: diff --git a/src/lib.rs b/src/lib.rs index 1d89d76..bd5bb83 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -4,7 +4,7 @@ /*! -# Chrono 0.2.13 +# Chrono 0.2.14 Date and time handling for Rust. (also known as `rust-chrono`) It aims to be a feature-complete superset of the [time](https://github.com/rust-lang/time) library. @@ -34,7 +34,7 @@ Or in the case you are using Rust 1.0 beta, pin the exact version: ```toml [dependencies] -chrono = "=0.2.13" +chrono = "=0.2.14" ``` And put this in your crate root: