Bug #76926 [Com]: The date constant format is different. DATE_RFC1123ã
| From: | no-reply at example dot com | Date: | Wed, 26 Sep 2018 01:15:17 +0000 |
| Subject: | Bug #76926 [Com]: The date constant format is different. DATE_RFC1123ã | ||
| References: | 1 | Groups: | php.doc.bugs |
| Request: | Send a blank email to doc-bugs+get-16019@lists.php.net to get a copy of this message | ||
Edit report at https://bugs.php.net/bug.php?id=76926&edit=1
ID: 76926
Comment by: no-reply at example dot com
Reported by: no-reply at example dot com
Summary: The date constant format is different.
DATE_RFC1123ã
Status: Feedback
Type: Bug
Package: Documentation problem
PHP Version: 7.3.0RC1
Block user comment: N
Private report: N
New Comment:
<!DOCTYPE html>
<html><head><meta charset="UTF-8"></head>
<body><script>
alert('RFC-1123 formatted date stamp is ' + (new Date).toUTCString())
</script>
</html>
Previous Comments:
------------------------------------------------------------------------
[2018-09-26 01:02:37] no-reply at example dot com
https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toUTCString
dateObj.toUTCString()
The most common return value was an RFC-1123 formatted date stamp
------------------------------------------------------------------------
[2018-09-24 02:29:14] requinix@php.net
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.
https://tools.ietf.org/html/rfc1123
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)
https://tools.ietf.org/html/rfc822
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.
https://docs.microsoft.com/en-us/dotnet/standard/base-types/standard-date-and-time-format-strings#RFC1123
------------------------------------------------------------------------
[2018-09-24 02:10:42] no-reply at example dot com
Description:
------------
DATE_RFC1123
The date constant format is different.
Reference material for RFC1123.
https://docs.microsoft.com/en-us/dotnet/api/system.globalization.datetimeformatinfo.rfc1123pattern?view=netframework-4.7.2
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
------------------------------------------------------------------------
--
Edit this bug report at https://bugs.php.net/bug.php?id=76926&edit=1