-
-
Notifications
You must be signed in to change notification settings - Fork 19
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add unix_timestamp_offset
to TimeConfig
#45
Conversation
please review |
Codecov Report
Additional details and impacted files@@ Coverage Diff @@
## main #45 +/- ##
==========================================
- Coverage 99.17% 99.07% -0.11%
==========================================
Files 6 6
Lines 847 862 +15
==========================================
+ Hits 840 854 +14
- Misses 7 8 +1
Continue to review full report in Codecov by Sentry.
|
I think this should be |
It is an enum with two options |
Do you mean the name of the field on #[derive(Debug, Clone, Default, Copy)]
pub enum DefaultTimeOffset {
#[default]
Naive,
Utc,
}
// ...
#[derive(Debug, Clone, Default)]
pub struct TimeConfig {
pub microseconds_precision_overflow_behavior: MicrosecondsPrecisionOverflowBehavior,
pub default_time_offset: DefaultTimeOffset,
} Are you just suggesting changing |
If the input is a number or a numeric string both of which are interpreted as Unix timestamps, then this setting should decide if the timezone is Hence the struct member name should change to |
Is this what you mean? d39415f#diff-cc856031f5a2bd26067d2ed100ee6e0dc576d5ed7c354a6f223468b7e5b85664 |
src/time.rs
Outdated
@@ -320,6 +349,11 @@ impl Time { | |||
} | |||
} | |||
|
|||
let tz_offset = match (tz_offset, config.default_time_offset) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this should be removed.
please review |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Seems good to me but best to wait for @samuelcolvin to confirm as they have a clear idea of what needs to happen.
unix_timestamp_offset
to TimeConfig
Fix #41.