1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
/*******************************************************************************
*
* Copyright (c) 2025 - 2026.
* Haixing Hu, Qubit Co. Ltd.
*
* All rights reserved.
*
******************************************************************************/
//! Clock trait with timezone support.
//!
//! This module defines the [`ZonedClock`] trait, which extends [`Clock`] to
//! provide timezone support and local time access.
//!
//! # Author
//!
//! Haixing Hu
use crateClock;
use ;
use Tz;
/// A trait representing a clock with timezone support.
///
/// This trait extends [`Clock`] to provide timezone information and methods
/// to get the current local time in the clock's timezone.
///
/// # Examples
///
/// ```
/// use qubit_clock::{Clock, ZonedClock, SystemClock, Zoned};
/// use chrono_tz::Asia::Shanghai;
///
/// let clock = Zoned::new(SystemClock::new(), Shanghai);
/// let local = clock.local_time();
/// println!("Local time in Shanghai: {}", local);
/// ```
///
/// # Author
///
/// Haixing Hu