Merge pull request #452 from edkalina/master

Fix chrono-tz integration
This commit is contained in:
Sunli 2021-03-25 09:08:42 +08:00 committed by GitHub
commit e652877d62
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 3 deletions

View File

@ -1,6 +1,6 @@
use chrono_tz::Tz;
use crate::{InputValueError, InputValueResult, Result, Scalar, ScalarType, Value};
use crate::{InputValueError, InputValueResult, Scalar, ScalarType, Value};
#[Scalar(internal, name = "TimeZone")]
impl ScalarType for Tz {
@ -12,6 +12,6 @@ impl ScalarType for Tz {
}
fn to_value(&self) -> Value {
Value::String(Tz::name(self))
Value::String(self.name().to_owned())
}
}

View File

@ -13,7 +13,7 @@ mod string;
#[cfg(feature = "bson")]
mod bson;
#[cfg(feature = "chrono_tz")]
#[cfg(feature = "chrono-tz")]
mod chrono_tz;
#[cfg(feature = "chrono")]
mod datetime;