chrono/src
Casey Marshall b39597f537 Fix panic for negative inputs to timestamp_millis.
This patch fixes the case where a negative millisecond offset is passed
to Timezone::timestamp_millis and timestamp_millis_opt and adds a test
case for it. Without this patch, calling timestamp_offset with a
negative value will panic with an overflow like this:

```
---- tests::test_parse_samples stdout ----
thread 'tests::test_parse_samples' panicked at 'attempt to multiply with
overflow',
/home/c/.cargo/registry/src/github.com-1ecc6299db9ec823/chrono-0.4.6/src/offset/mod.rs:349:34
note: Some details are omitted, run with `RUST_BACKTRACE=full` for a
verbose backtrace.
stack backtrace:
   0: std::sys::unix::backtrace::tracing:👿:unwind_backtrace
             at libstd/sys/unix/backtrace/tracing/gcc_s.rs:49
   1: std::sys_common::backtrace::print
             at libstd/sys_common/backtrace.rs:71
             at libstd/sys_common/backtrace.rs:59
   2: std::panicking::default_hook::{{closure}}
             at libstd/panicking.rs:211
   3: std::panicking::default_hook
             at libstd/panicking.rs:221
   4: std::panicking::rust_panic_with_hook
             at libstd/panicking.rs:477
   5: std::panicking::continue_panic_fmt
             at libstd/panicking.rs:391
   6: rust_begin_unwind
             at libstd/panicking.rs:326
   7: core::panicking::panic_fmt
             at libcore/panicking.rs:77
   8: core::panicking::panic
             at libcore/panicking.rs:52
   9: chrono::offset::TimeZone::timestamp_millis_opt
             at
/home/c/.cargo/registry/src/github.com-1ecc6299db9ec823/chrono-0.4.6/src/offset/mod.rs:349
  10: chrono::offset::TimeZone::timestamp_millis
             at
/home/c/.cargo/registry/src/github.com-1ecc6299db9ec823/chrono-0.4.6/src/offset/mod.rs:327
```
2018-12-02 11:26:42 -06:00
..
format Test formatting with more precise nanoseconds 2018-06-13 23:00:31 -04:00
naive Merge pull request #252 from quodlibetor/negative-timestamps 2018-07-28 17:07:04 -04:00
offset Fix panic for negative inputs to timestamp_millis. 2018-12-02 11:26:42 -06:00
date.rs impl Sub<T> for <T> for Date/Time types 2018-04-03 13:42:03 +01:00
datetime.rs Fix doc 2018-07-18 04:45:11 -05:00
div.rs Use no_std-compatible num dependencies 2018-02-23 00:07:16 -08:00
lib.rs Merge pull request #282 from 3point2/doc-grammar 2018-11-26 23:23:36 -05:00
oldtime.rs Remove dependencies from oldtime::Duration on rest of time crate 2018-03-30 16:08:45 -07:00
round.rs Rename SubSecondRound to SubsecRound 2018-03-05 12:57:26 -08:00