forked from extern/nushell
fixed usages of deprecated chrono DateTime::from_utc (#10161)
This addresses the warnings generated from using DateTime::from_utc. DateTime::from_utc was deprecated as of chrono 0.4.27 Co-authored-by: Jack Wright <jack.wright@disqo.com>
This commit is contained in:
@ -3993,7 +3993,7 @@ mod tests {
|
||||
#[test]
|
||||
fn test_datetime() {
|
||||
let string = Value::Date {
|
||||
val: DateTime::from_utc(
|
||||
val: DateTime::from_naive_utc_and_offset(
|
||||
NaiveDateTime::from_timestamp_millis(-123456789).unwrap(),
|
||||
FixedOffset::east_opt(0).unwrap(),
|
||||
),
|
||||
@ -4010,7 +4010,7 @@ mod tests {
|
||||
#[test]
|
||||
fn test_negative_year_datetime() {
|
||||
let string = Value::Date {
|
||||
val: DateTime::from_utc(
|
||||
val: DateTime::from_naive_utc_and_offset(
|
||||
NaiveDateTime::from_timestamp_millis(-72135596800000).unwrap(),
|
||||
FixedOffset::east_opt(0).unwrap(),
|
||||
),
|
||||
|
Reference in New Issue
Block a user