|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
[2006-06-09 21:50 UTC] rosty dot kerei at gmail dot com
Description: ------------ The function gmdate() actually returns UTC time instead of GMT and it's different on summer time (GMT = UTC+1 hour). Learn more here: http://en.wikipedia.org/wiki/GMT http://en.wikipedia.org/wiki/UTC For example, now I'm situated in Kiev, Ukraine (GMT+2), it's summer time and it's 04:00AM here, but in London (in GMT zone) it's 02:00AM, however the function returns 01:00AM - it's not GMT, it's UTC time. This function should work well in winter. Reproduce code: --------------- <?php echo gmdate('H:i', time()); ?> Expected result: ---------------- 02:00AM Actual result: -------------- 01:00AM PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
|
|||||||||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Mon Dec 08 19:00:02 2025 UTC |
Paste the output of the following script please: <?php echo date_default_timezone_get(), "\n"; echo date(DATE_RFC2822. " T e Z"), "\n"; echo gmdate(DATE_RFC2822. " T e Z"), "\n"; date_default_timezone_set('Europe/Kiev'); echo date_default_timezone_get(), "\n"; echo date(DATE_RFC2822. " T e Z"), "\n"; echo gmdate(DATE_RFC2822. " T e Z"), "\n"; ?>