Skip to content

Fix GH-11281: DateTimeZone::getName() does not include seconds in offset#11282

Closed
ndossche wants to merge 1 commit into
php:PHP-8.1from
ndossche:fix-11281
Closed

Fix GH-11281: DateTimeZone::getName() does not include seconds in offset#11282
ndossche wants to merge 1 commit into
php:PHP-8.1from
ndossche:fix-11281

Conversation

@ndossche

Copy link
Copy Markdown
Member

If the seconds portion is non-zero, include the seconds in the output.

I didn't split the snprintf call along two paths to reduce code duplication. I looked up if this is well-defined behaviour: according to the C11 standard section 7.21.6.1 & 7.21.6.6 we can pass additional arguments to *printf functions and they'll just get ignored.

…offset

If the seconds portion is non-zero, include the seconds in the output.

@iluuu1994 iluuu1994 left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

LGTM, thanks!

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.

DateTimeZone::getName() does not include seconds in offset

2 participants