Req #67242 [Com]: No Timezone specified for Pakistan
| From: | bestacademyonline at gmail dot com | Date: | Fri, 19 Dec 2014 01:55:07 +0000 |
| Subject: | Req #67242 [Com]: No Timezone specified for Pakistan | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-189120@lists.php.net to get a copy of this message | ||
Edit report at https://bugs.php.net/bug.php?id=67242&edit=1
ID: 67242
Comment by: bestacademyonline at gmail dot com
Reported by: farhan at askwhyweb dot com
Summary: No Timezone specified for Pakistan
Status: Not a bug
Type: Feature/Change Request
Package: Date/time related
Operating System: ANY
PHP Version: 5.4.28
Block user comment: N
Private report: N
New Comment:
Instead of Asia/Pakistan, Use Asia/Karachi.
set_default_timezone_set('Asia/Karachi');
Previous Comments:
------------------------------------------------------------------------
[2014-08-16 10:46:31] fa@php.net
Thank you for taking the time to write to us, but this is not
a bug. Please double-check the documentation available at
http://www.php.net/manual/ and the instructions on how to
report
a bug at http://bugs.php.net/how-to-report.php
Asia/Karachi is correct, c.f. http://en.wikipedia.org/wiki/List_of_tz_database_time_zones
------------------------------------------------------------------------
[2014-08-16 00:10:33] ppasindud at gmail dot com
Asia/Karachi
------------------------------------------------------------------------
[2014-05-10 02:56:52] farhan at askwhyweb dot com
Description:
------------
---
From manual page: http://www.php.net/timezones
---
There is no such timezone for Pakistan (an asian country).
When use Asia/Pakistan the PHP throws error saying not applicable.
Quite strange but it needs to be there.
Test script:
---------------
date_default_timezone_set('Etc/GMT+5');
echo "The time is " . date("h:i:sa");
// Output is 14 hours above the original time.
// Second case
date_default_timezone_set('Asia/Pakistan');
echo "The time is " . date("h:i:sa");
// Output no error but time behind 3 hours to the original time.
Expected result:
----------------
Was expecting input for 'Asia/Pakistan' in date_default_timezone_set function which is
accepting the region but not giving expected current time of the region.
Actual result:
--------------
Not accurate/ false
------------------------------------------------------------------------
--
Edit this bug report at https://bugs.php.net/bug.php?id=67242&edit=1