-
Notifications
You must be signed in to change notification settings - Fork 527
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
TimeZone should be able to be used as a trait object #432
Comments
The solution is to use # Cargo.toml
[package]
name = "example"
version = "0.1.0"
edition = "2018"
[dependencies]
chrono = "0.4.11"
chrono-tz = "0.5.2" // src/main.rs
use std::sync::Arc;
use chrono_tz::Tz;
#[derive(Debug)]
struct TimezoneHolder {
value: Arc<Tz>,
}
pub fn main() -> () {
let holder = TimezoneHolder { value: Arc::new(Tz::America__Los_Angeles) };
println!("holder is {:?}", holder);
}
|
Yeah unfortunately I believe that the inner |
quodlibetor
changed the title
How to store TimeZone in Arc?
TimeZone should be able to be used as a trait object
Jun 11, 2020
See also: #822 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hi chrono maintainers,
Is there any way to store a
TimeZone
in anArc
?Best,
Michael
The text was updated successfully, but these errors were encountered: