Skip to content

Commit

Permalink
Storing start times in zone offset periods (#6024)
Browse files Browse the repository at this point in the history
Required for a future merge with metazone periods.
  • Loading branch information
robertbastian authored Jan 21, 2025
1 parent 30de31a commit 9734287
Show file tree
Hide file tree
Showing 6 changed files with 1,338 additions and 1,328 deletions.
4 changes: 2 additions & 2 deletions components/timezone/src/zone_offset.rs
Original file line number Diff line number Diff line change
Expand Up @@ -113,8 +113,8 @@ impl ZoneOffsetCalculator {
let mut offsets = None;
let minutes_since_epoch_walltime = (date.to_fixed() - EPOCH) as i32 * 24 * 60
+ (time.hour.number() as i32 * 60 + time.minute.number() as i32);
for (minutes, id) in cursor.iter1_copied().rev() {
if minutes_since_epoch_walltime <= i32::from_unaligned(*minutes) {
for (minutes, id) in cursor.iter1_copied() {
if minutes_since_epoch_walltime >= i32::from_unaligned(*minutes) {
offsets = Some(id);
} else {
break;
Expand Down

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion provider/data/timezone/fingerprints.csv
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
time_zone/bcp47_to_iana@1, <singleton>, 7630B, 7609B, 7efd2629d86e0cdc
time_zone/iana_to_bcp47@3, <singleton>, 9551B, 9509B, ef97860b5f688e6d
time_zone/offset_period@1, <singleton>, 13374B, 13286B, 397b18d3f2345411
time_zone/offset_period@1, <singleton>, 13374B, 13286B, cc9df75dce761bbe
time_zone/windows_zones_to_bcp47@1, <singleton>, 8634B, 8591B, 90b7fe3f9cadf5bd

Large diffs are not rendered by default.

Loading

0 comments on commit 9734287

Please sign in to comment.