From 3d6b16354697e6036a57819d79f2f6084392938a Mon Sep 17 00:00:00 2001 From: Ellie Huxtable Date: Sat, 2 Mar 2024 17:05:04 +0000 Subject: fix(tz): attempt to fix timezone reading (#1810) --- atuin-client/src/settings.rs | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'atuin-client/src') diff --git a/atuin-client/src/settings.rs b/atuin-client/src/settings.rs index a71091e2..3b34381c 100644 --- a/atuin-client/src/settings.rs +++ b/atuin-client/src/settings.rs @@ -151,7 +151,11 @@ impl FromStr for Timezone { fn from_str(s: &str) -> Result { // local timezone if matches!(s.to_lowercase().as_str(), "l" | "local") { - let offset = UtcOffset::current_local_offset()?; + // There have been some timezone issues, related to errors fetching it on some + // platforms + // Rather than fail to start, fallback to UTC. The user should still be able to specify + // their timezone manually in the config file. + let offset = UtcOffset::current_local_offset().unwrap_or(UtcOffset::UTC); return Ok(Self(offset)); } -- cgit v1.3.1