Skip to content

GMT Offset Type Errors#5094

Open
rleeson wants to merge 3 commits intoWordPress:trunkfrom
rleeson:58986
Open

GMT Offset Type Errors#5094
rleeson wants to merge 3 commits intoWordPress:trunkfrom
rleeson:58986

Conversation

@rleeson
Copy link
Copy Markdown

@rleeson rleeson commented Aug 25, 2023

Edge cases of a missing/invalid GMT offset can cause type casting error. Additionally, Core contained multiple direct calls to retrieve this option with an inconsistent usage and an apparent misconception in some resolutions that the offset was an integer, where it is actually a float/double.

To address the issue, I added current_gmt_offset to ensure a valid float, with default offset of 0, and further replaced all instances of the direct data retrieval with this function as a proxy.

Trac tickets: Ticket #58986 and Ticket # 57035


This Pull Request is for code review only. Please keep all other discussion in the Trac ticket. Do not merge this Pull Request. See GitHub Pull Requests for Code Review in the Core Handbook for more details.

- Also replaces all current Core calls to read the gmt_offset option with this function
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.

1 participant