|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2006-12-12 07:34 UTC] liber at iproom dot com
[2006-12-12 12:22 UTC] derick@php.net
[2006-12-12 15:51 UTC] liber at iproom dot com
[2007-07-11 18:28 UTC] derick@php.net
[2020-02-07 06:10 UTC] phpdocbot@php.net
|
|||||||||||||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Thu Nov 20 04:00:01 2025 UTC |
Description: ------------ DateTime class already has a getOffset to returns DST offset. But DateTimeZone has a parameter of DateTime, the result still returns only the DateTimeZone DST offset itself ? Should not it returns the offset between the DateTimeZone and the given parameter of DateTime ? Reproduce code: --------------- $dateTimeZoneTaipei = new DateTimeZone("Asia/Taipei"); $dateTimeZoneJapan = new DateTimeZone("Asia/Tokyo"); $dateTimeTaipei = new DateTime("now", $dateTimeZoneTaipei); $dateTimeJapan = new DateTime("now", $dateTimeZoneJapan); $timeOffset = $dateTimeZoneJapan->getOffset($dateTimeTaipei); var_dump($timeOffset); Expected result: ---------------- int(3600) Actual result: -------------- int(32400)