Skip to content

[4.6] feat: preserve UTC 'Z' indicator in Period JSON serialization - #776

Merged
phil-davis merged 2 commits into
sabre-io:4.6from
phil-davis:utc-z-4.6
Jul 7, 2026
Merged

phil-davis merged 2 commits into
sabre-io:4.6from
phil-davis:utc-z-4.6

Conversation

@phil-davis

Copy link
Copy Markdown
Contributor

Backport #765 to 4.6 branch.

When serializing PERIOD values to JSON (for jCal format), preserve the 'Z' timezone indicator for UTC datetimes. This ensures FREEBUSY periods maintain explicit UTC designation, avoiding timezone ambiguity.

Without this change:
FREEBUSY:20120226T230000Z/20120226T230000Z
=> serializes to: ["2012-02-26T23:00:00", "2012-02-26T23:00:00"]

With this change:
FREEBUSY:20120226T230000Z/20120226T230000Z
=> serializes to: ["2012-02-26T23:00:00Z", "2012-02-26T23:00:00Z"]

This behavior is consistent with RFC 5545 which requires UTC times to be designated with the 'Z' suffix.

Related: #411

guimard and others added 2 commits July 7, 2026 12:37
When serializing PERIOD values to JSON (for jCal format), preserve the 'Z'
timezone indicator for UTC datetimes. This ensures FREEBUSY periods maintain
explicit UTC designation, avoiding timezone ambiguity.

Without this change:
  FREEBUSY:20120226T230000Z/20120226T230000Z
  => serializes to: ["2012-02-26T23:00:00", "2012-02-26T23:00:00"]

With this change:
  FREEBUSY:20120226T230000Z/20120226T230000Z
  => serializes to: ["2012-02-26T23:00:00Z", "2012-02-26T23:00:00Z"]

This behavior is consistent with RFC 5545 which requires UTC times to be
designated with the 'Z' suffix.

Related: sabre-io#411
@codecov

codecov Bot commented Jul 7, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 98.57%. Comparing base (9aad7e8) to head (5089a68).
⚠️ Report is 1 commits behind head on 4.6.

Additional details and impacted files
@@            Coverage Diff            @@
##                4.6     #776   +/-   ##
=========================================
  Coverage     98.57%   98.57%           
- Complexity     1947     1949    +2     
=========================================
  Files            71       71           
  Lines          5325     5327    +2     
=========================================
+ Hits           5249     5251    +2     
  Misses           76       76           

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@phil-davis
phil-davis marked this pull request as ready for review July 7, 2026 03:13
@phil-davis
phil-davis merged commit 99b1ca5 into sabre-io:4.6 Jul 7, 2026
12 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants