Skip to content

Commit

Permalink
0.2.14: fixed a subtle bug in Naive(Date)Time addition.
Browse files Browse the repository at this point in the history
- `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)
  • Loading branch information
lifthrasiir committed May 14, 2015
1 parent 5ff21f4 commit 9cff70b
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 5 deletions.
9 changes: 9 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "chrono"
version = "0.2.13"
version = "0.2.14"
authors = ["Kang Seonghoon <[email protected]>"]

description = "Date and time library for Rust"
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
[Chrono][doc] 0.2.13
[Chrono][doc] 0.2.14
====================

[![Chrono on Travis CI][travis-image]][travis]
Expand Down Expand Up @@ -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:
Expand Down
4 changes: 2 additions & 2 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down Expand Up @@ -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:
Expand Down

0 comments on commit 9cff70b

Please sign in to comment.