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
use Local;
/// ### tz_string()
///
/// Retrieves the current local timezone offset as a string.
///
/// This function obtains the local timezone offset from the `chrono` crate and formats it
/// as a string. It provides a human-readable representation of the timezone offset, which
/// can be useful for logging or displaying the user's local time settings.
///
/// ### Example
///
/// ```
/// use wtime::tz::tz_string;
///
/// let offset_string = tz_string();
/// println!("Current timezone offset: {}", offset_string);
/// ```
///
/// ### Returns
///
/// Returns the current timezone offset as a `String`.
///
/// <small>End Fun Doc</small>
/// ### tz_number()
///
/// Retrieves the local timezone offset as an `i64` in hours.
///
/// This function calculates the local timezone offset and returns it as an integer value
/// representing the number of hours offset from UTC. This can be useful for calculating
/// time differences or adjusting timestamps to local time.
///
/// ### Example
///
/// ```
/// use wtime::tz::tz_number;
///
/// let offset_number = tz_number();
/// println!("Current timezone offset in hours: {}", offset_number);
/// ```
///
/// ### Returns
///
/// Returns the local timezone offset as an `i64` representing the total number of hours from UTC.
/// If there is an error in parsing, it defaults to returning `0`.
///
/// <small>End Fun Doc</small>