Skip to content

Commit 3525d99

Browse files
committed
use iana_time_zone for getting system timezone
1 parent da82378 commit 3525d99

File tree

4 files changed

+3
-46
lines changed

4 files changed

+3
-46
lines changed

Cargo.lock

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,3 +56,4 @@ arrayref = "0.3.9"
5656
libc = { version = "0.2.171", default-features = false }
5757
semaphore = "0.4.0"
5858
circular-queue = "0.2.7"
59+
iana-time-zone = "0.1.63"

src/server/mod.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@ pub mod config;
1414
pub mod db;
1515
pub mod handle;
1616
pub mod rate_limit;
17-
pub mod tz;
1817

1918
pub async fn main(config: Config) {
2019
let config = Arc::new(config);
@@ -33,7 +32,7 @@ pub async fn main(config: Config) {
3332
.database
3433
.timezone
3534
.clone()
36-
.or(tz::get_system_timezone())
35+
.or(iana_time_zone::get_timezone().ok())
3736
{
3837
Some(tz) => match db.setup_timezone(&tz).await {
3938
Ok(()) => info!("Timezone updated to \"{tz}\" successfully"),

src/server/tz.rs

Lines changed: 0 additions & 44 deletions
This file was deleted.

0 commit comments

Comments
 (0)