doc-en icon indicating copy to clipboard operation
doc-en copied to clipboard

Add format RFC 7231 warning

Open jorgsowa opened this issue 2 years ago • 7 comments

Format RFC 7231 doesn't take into consideration the timezone of the DateTime object. It shows always GMT designation. It should be reflected in documentation.

jorgsowa avatar Feb 14 '23 23:02 jorgsowa

Hmm, I am not sure if this is wise. The implementation discards the timezone, which isn't quite the same as showing it in GMT. The constant is therefore a little misleading.

derickr avatar Feb 28 '23 12:02 derickr

I would argue that this patch in php-src is therefore wrong.

derickr avatar Feb 28 '23 12:02 derickr

Hey @derickr. What do you think about merging this warning and implement fix for the constant later. This way developers are informed until the fix is ready.

jorgsowa avatar Aug 16 '23 18:08 jorgsowa

I think that the text should indicate that this is currently a known bug, and you should also indent your insertion right (misses an extra space).

derickr avatar Aug 17 '23 13:08 derickr

@derickr, this is not a bug. This is constant designed specifically this way. I fixed the indentation.

jorgsowa avatar Aug 17 '23 20:08 jorgsowa

The bug is that the constant just makes it show as it is UTC/GMT without actually adjusting the timezone of the DateTime object that is being formatted.

derickr avatar Aug 17 '23 21:08 derickr