diff options
| author | Conrad Ludgate <conradludgate@gmail.com> | 2024-01-01 16:42:36 +0000 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-01-01 16:42:36 +0000 |
| commit | e2a4e9cf13c939e8b158c58cbc5c4f8af8e994e3 (patch) | |
| tree | dcec0f13b0d51ddf4d0498d87378b072b7b7f4c7 /atuin-client | |
| parent | refactor(bash): factorize `__atuin_accept_line` (#1476) (diff) | |
| download | atuin-e2a4e9cf13c939e8b158c58cbc5c4f8af8e994e3.zip | |
fix(stats): time now_local not working
Diffstat (limited to 'atuin-client')
| -rw-r--r-- | atuin-client/src/settings.rs | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/atuin-client/src/settings.rs b/atuin-client/src/settings.rs index 93bc64ea..7e251550 100644 --- a/atuin-client/src/settings.rs +++ b/atuin-client/src/settings.rs @@ -219,7 +219,13 @@ pub struct Settings { // This is automatically loaded when settings is created. Do not set in // config! Keep secrets and settings apart. + #[serde(skip)] pub session_token: String, + + // This is determined at startup and cached. + // This is due to non-threadsafe get-env limitations. + #[serde(skip)] + pub local_tz: Option<time::UtcOffset>, } impl Settings { @@ -488,6 +494,8 @@ impl Settings { settings.session_token = String::from("not logged in"); } + settings.local_tz = time::UtcOffset::current_local_offset().ok(); + Ok(settings) } |
