diff options
| author | Ellie Huxtable <ellie@elliehuxtable.com> | 2024-03-02 17:05:04 +0000 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-03-02 17:05:04 +0000 |
| commit | 3d6b16354697e6036a57819d79f2f6084392938a (patch) | |
| tree | 36fa6b4ca93d4245ac113abc024618252ac3a3ff /atuin-client/src | |
| parent | fix(regex): disable regex error logs (#1806) (diff) | |
| download | atuin-3d6b16354697e6036a57819d79f2f6084392938a.zip | |
fix(tz): attempt to fix timezone reading (#1810)
Diffstat (limited to 'atuin-client/src')
| -rw-r--r-- | atuin-client/src/settings.rs | 6 |
1 files changed, 5 insertions, 1 deletions
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<Self> { // 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)); } |
