Skip to content

Conversation

@jedel1043
Copy link
Member

Makes it so that our timezone calculations don't depend on the is_dst field to calculate if a datetime is within a forward transition.

I think this is a breaking change, but because the timezone providers are unstable, it should be fine.

@jedel1043 jedel1043 added C-api Changes related to the public API C-internal Internal library improvements labels Jun 18, 2025
Copy link
Member

@nekevss nekevss left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me!

one thought that's non-blocking. But either way, I'm fine with merging.

/// `UtcOffsetSeconds` represents the amount of seconds we need to add to the UTC to reach the local time.
#[derive(Debug, Clone, Copy, PartialEq, Eq)]
pub struct TimeZoneOffset {
pub struct UtcOffsetSeconds(pub i64);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

praise: yeah, this is a better name

Ambiguous {
std: LocalTimeRecord,
dst: LocalTimeRecord,
std: UtcOffsetSeconds,
Copy link
Member

@nekevss nekevss Jun 18, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thought: maybe these should be changed from std/dst to standard/savings

General thought is to move away from the day light savings time reference. So savings is the offset that "saves" time so to speak. That may be incorrect though too because standard / savings might be a bit incorrect here (thinking mostly about dublin)

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe standard and alternate then? It removes the "savings" terminology for something more general: an "alternate" timezone a region uses

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think my only concern would be that it's not so much an alternate as it is a secondary. Weirdly enough the only good term I can think of is savings (but that's after working on all of the zoneinfo stuff).

I think icu_time uses VariantOffsets and they use standard and daylight.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hmm yeah, maybe this requires a bigger discussion on how to name timezone things. I'll merge this in the meantime and we can have a names discussion before releasing 0.1

@jedel1043 jedel1043 merged commit 24422f5 into main Jun 19, 2025
8 checks passed
@jedel1043 jedel1043 deleted the no-is-dst branch June 19, 2025 02:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

C-api Changes related to the public API C-internal Internal library improvements

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants