|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #76926 The date constant format is different. DATE_RFC1123 
Submitted: 2018-09-24 02:10 UTC Modified: 2018-11-18 22:37 UTC
From: no-reply at example dot com Assigned:
Status: No Feedback Package: Documentation problem
PHP Version: 7.3.0RC1 OS:
Private report: No CVE-ID: None
Have you experienced this issue?
Rate the importance of this bug to you:

 [2018-09-24 02:10 UTC] no-reply at example dot com
The date constant format is different.

Reference material for RFC1123.

Test script:
php -r "echo gmdate(DATE_RFC1123, gmmktime(0,0,0,1,1,2018));"

Expected result:
Mon, 01 Jan 2018 00:00:00 GMT

Actual result:
Mon, 01 Jan 2018 00:00:00 +0000


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2018-09-24 02:29 UTC]
-Status: Open +Status: Feedback
 [2018-09-24 02:29 UTC]
You know we aren't Microsoft, right?

The actual RFC 1123 says
> There is a strong trend towards the use of numeric timezone
> indicators, and implementations SHOULD use numeric timezones
> instead of timezone names.

And the standard there is basically just a slight adjustment to RFC 822's which describes the timezone as
> zone = ... / ( ("+" / "-") 4DIGIT ) ; Local differential hours+min. (HHMM)

And the actual output from PHP matches what the documentation describes. So I don't know what bug you're reporting.

If anything it's .NET that's difficult because the format string clearly outputs "GMT" as the timezone, which is alluded to in the general date/time formatting docs:
> Although the RFC 1123 standard expresses a time as Coordinated Universal Time (UTC), the formatting operation
> does not modify the value of the DateTime object that is being formatted. Therefore, you must convert the
> DateTime value to UTC by calling the DateTime.ToUniversalTime method before you perform the formatting
> operation.
 [2018-09-26 01:02 UTC] no-reply at example dot com

The most common return value was an RFC-1123 formatted date stamp
 [2018-09-26 01:15 UTC] no-reply at example dot com
<!DOCTYPE html>
<html><head><meta charset="UTF-8"></head>
alert('RFC-1123 formatted date stamp is ' + (new Date).toUTCString())
 [2018-09-26 01:16 UTC]

Use your words. Full sentences.
 [2018-09-26 01:28 UTC]
If you aren't comfortable writing English then use your native language. Either way, speak, don't link.
 [2018-11-18 22:37 UTC]
-Status: Feedback +Status: No Feedback
 [2018-11-18 22:37 UTC]
No feedback was provided. The bug is being suspended because
we assume that you are no longer experiencing the problem.
If this is not the case and you are able to provide the
information that was requested earlier, please do so and
change the status of the bug back to "Re-Opened". Thank you.
PHP Copyright © 2001-2022 The PHP Group
All rights reserved.
Last updated: Thu Oct 06 15:05:53 2022 UTC