php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Doc Bug #75560 Date time related now error in timestamp and output
Submitted: 2017-11-23 12:32 UTC Modified: 2017-11-23 12:36 UTC
From: bsmanisha at yahoo dot com Assigned:
Status: Feedback Package: Date/time related
PHP Version: master-Git-2017-11-23 (Git) OS: Windows 10
Private report: No CVE-ID: None
Have you experienced this issue?
Rate the importance of this bug to you:

 [2017-11-23 12:32 UTC] bsmanisha at yahoo dot com
Description:
------------
---
From manual page: http://www.php.net/function.strtotime
---
Server & Network Information
Hostname: 164.sub-174-215-2.myvzw.com
Proxy: No Proxy or Invisible Proxy Used
Internal LAN IP: standby...
SCRIPT_URL: /more-info-about-you/
SCRIPT_URI: http://www.whatsmyip.org/more-info-about-you/
HTTP_HOST: www.whatsmyip.org
HTTP_CONNECTION: keep-alive
HTTP_UPGRADE_INSECURE_REQUESTS: 1
HTTP_ACCEPT: text/html, application/xhtml+xml, application/xml;q=0.9, */*;q=0.8
HTTP_USER_AGENT: Mozilla/5.0 (iPhone; CPU iPhone OS 11_1_2 like Mac OS X) AppleWebKit/604.3.5 (KHTML, like Gecko) Version/11.0 Mobile/15B202 Safari/604.1
HTTP_REFERER: http://www.whatsmyip.org/string-timestamp-converter/
HTTP_ACCEPT_LANGUAGE: en-us
HTTP_ACCEPT_ENCODING: gzip, deflate
SERVER_SIGNATURE: <address>Apache/2.2.24 (Unix) DAV/2 mod_fastcgi/2.4.2 mod_ssl/2.2.24 OpenSSL/0.9.8y Server at www.whatsmyip.org Port 80</address>
SERVER_SOFTWARE: Apache/2.2.24 (Unix) DAV/2 mod_fastcgi/2.4.2 mod_ssl/2.2.24 OpenSSL/0.9.8y
SERVER_NAME: www.whatsmyip.org
SERVER_ADDR: 208.64.38.55
SERVER_PORT: 80
REMOTE_PORT: 10038
GATEWAY_INTERFACE: CGI/1.1
SERVER_PROTOCOL: HTTP/1.1
REQUEST_METHOD: GET
QUERY_STRING:
REQUEST_URI: /more-info-about-you/
SCRIPT_NAME: /more-info-about-you/index.php
PHP_SELF: /more-info-about-you/index.php
REQUEST_TIME: 1511439923 (Thu, 23 Nov 2017 07:25:23 -0500)
Browser Information
Refered From: http://www.whatsmyip.org/string-timestamp-converter/
User Agent: Mozilla/5.0 (iPhone; CPU iPhone OS 11_1_2 like Mac OS X) AppleWebKit/604.3.5 (KHTML, like Gecko) Version/11.0 Mobile/15B202 Safari/604.1
Screen Resolution: 375 x 667 (pixels)
Browser Dimensions: 980 x 1640 (pixels)
Cookie Status: Enabled
Cookies (Only Cookies Visible to WhatsMyIP.org): none
Browser Plugins: No Plugins Installed

Test script:
---------------
Date time timestamp and now related error generating output error in array regarding input in bug tracking system.
Server & Network Information
Hostname: 164.sub-174-215-2.myvzw.com
Proxy: No Proxy or Invisible Proxy Used
Internal LAN IP: standby...
SCRIPT_URL: /more-info-about-you/
SCRIPT_URI: http://www.whatsmyip.org/more-info-about-you/
HTTP_HOST: www.whatsmyip.org
HTTP_CONNECTION: keep-alive
HTTP_UPGRADE_INSECURE_REQUESTS: 1
HTTP_ACCEPT: text/html, application/xhtml+xml, application/xml;q=0.9, */*;q=0.8
HTTP_USER_AGENT: Mozilla/5.0 (iPhone; CPU iPhone OS 11_1_2 like Mac OS X) AppleWebKit/604.3.5 (KHTML, like Gecko) Version/11.0 Mobile/15B202 Safari/604.1
HTTP_REFERER: http://www.whatsmyip.org/string-timestamp-converter/
HTTP_ACCEPT_LANGUAGE: en-us
HTTP_ACCEPT_ENCODING: gzip, deflate
SERVER_SIGNATURE: <address>Apache/2.2.24 (Unix) DAV/2 mod_fastcgi/2.4.2 mod_ssl/2.2.24 OpenSSL/0.9.8y Server at www.whatsmyip.org Port 80</address>
SERVER_SOFTWARE: Apache/2.2.24 (Unix) DAV/2 mod_fastcgi/2.4.2 mod_ssl/2.2.24 OpenSSL/0.9.8y
SERVER_NAME: www.whatsmyip.org
SERVER_ADDR: 208.64.38.55
SERVER_PORT: 80
REMOTE_PORT: 10038
GATEWAY_INTERFACE: CGI/1.1
SERVER_PROTOCOL: HTTP/1.1
REQUEST_METHOD: GET
QUERY_STRING:
REQUEST_URI: /more-info-about-you/
SCRIPT_NAME: /more-info-about-you/index.php
PHP_SELF: /more-info-about-you/index.php
REQUEST_TIME: 1511439923 (Thu, 23 Nov 2017 07:25:23 -0500)
Browser Information
Refered From: http://www.whatsmyip.org/string-timestamp-converter/
User Agent: Mozilla/5.0 (iPhone; CPU iPhone OS 11_1_2 like Mac OS X) AppleWebKit/604.3.5 (KHTML, like Gecko) Version/11.0 Mobile/15B202 Safari/604.1
Screen Resolution: 375 x 667 (pixels)
Browser Dimensions: 980 x 1640 (pixels)
Cookie Status: Enabled
Cookies (Only Cookies Visible to WhatsMyIP.org): none
Browser Plugins: No Plugins Installed


Expected result:
----------------
Didn’t try running any script error was generated by bug tracking system
Date / Time Formats
This tool uses PHP's strtotime( ) function.
Some of the formats you can use:

1972-09-24# ISO 8601
72-9-24# Assume 19xx for 69 through 99, 20xx for 00 through 68
72-09-24# Leading zeros are ignored
9/24/72# Common U.S. writing
24 September 1972
24 Sept 72# September has a special abbreviation
24 Sep 72# Three-letter abbreviations always allowed
Sep 24, 1972
24-sep-72
24sep72
day month year
day month
month day year
day-month-year
20:02:00.000000
20:02
8:02pm
20:02-0500# In EST (U.S. Eastern Standard Time)
1 year
1 year ago
3 years
2 days
now
yyyymmdd

Actual result:
--------------
http://164.sub-174-215-2.myvzw.com
http://ipsite.org/3uz4

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2017-11-23 12:36 UTC] requinix@php.net
-Status: Open +Status: Feedback
 [2017-11-23 12:36 UTC] requinix@php.net
Not enough information was provided for us to be able
to handle this bug. Please re-read the instructions at
http://bugs.php.net/how-to-report.php

If you can provide more information, feel free to add it
to this bug and change the status back to "Open".

Thank you for your interest in PHP.



 
PHP Copyright © 2001-2017 The PHP Group
All rights reserved.
Last updated: Sun Nov 19 01:31:42 2017 UTC