mirror of
https://github.com/nushell/nushell.git
synced 2025-08-09 08:55:40 +02:00
Date utility commands (#2780)
* updated & added date related commands based on the new design * added proper error handling when date format string is invalid * fixed format issue * fixed an issue caused due to the change in primitive Date type * added `date list-timezone` command to list all supported time zones and updated `date to-timezone` accordingly
This commit is contained in:
@ -29,7 +29,7 @@ pub fn value_to_bson_value(v: &Value) -> Result<Bson, ShellError> {
|
||||
.expect("Unimplemented BUG: What about big decimals?"),
|
||||
),
|
||||
UntaggedValue::Primitive(Primitive::Duration(i)) => Bson::String(i.to_string()),
|
||||
UntaggedValue::Primitive(Primitive::Date(d)) => Bson::UtcDatetime(*d),
|
||||
UntaggedValue::Primitive(Primitive::Date(d)) => Bson::UtcDatetime((*d).into()),
|
||||
UntaggedValue::Primitive(Primitive::EndOfStream) => Bson::Null,
|
||||
UntaggedValue::Primitive(Primitive::BeginningOfStream) => Bson::Null,
|
||||
UntaggedValue::Primitive(Primitive::Decimal(d)) => {
|
||||
|
Reference in New Issue
Block a user