|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
[2014-05-10 02:56 UTC] 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 PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Sat Dec 13 03:00:02 2025 UTC |
Instead of Asia/Pakistan, Use Asia/Karachi. set_default_timezone_set('Asia/Karachi');