|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2010-09-17 15:24 UTC] derick@php.net
-Status: Open
+Status: Bogus
[2010-09-17 15:24 UTC] derick@php.net
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Wed Dec 03 23:00:01 2025 UTC |
Description: ------------ If I create a new DateTime object with different timezone and then try to get Unixtimestamp ('U'), I always get timestamp of my current timezone. Test script: --------------- // UTC+5 $date = new DateTime( 'now', new DateTimezone( 'Asia/Yekaterinburg' ) ); echo $date->format( 'U' ) . "\n"; // UTC+3 $date = new DateTime( 'now', new DateTimezone( 'Europe/Moscow' ) ); echo $date->format( 'U' ); Expected result: ---------------- 1284734980 1284727780 Actual result: -------------- 1284727780 1284727780