You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
DateTimeImmutable::diff differences in 8.1.10 onwards - timezone related. #9699
changed the title [-]`DateTimeImmutable::diff` differences on in 8.1.10 onwards[/-][+]`DateTimeImmutable::diff` differences on in 8.1.10 onwards - timezone related.[/+]on Oct 10, 2022
changed the title [-]`DateTimeImmutable::diff` differences on in 8.1.10 onwards - timezone related.[/-][+]`DateTimeImmutable::diff` differences in 8.1.10 onwards - timezone related.[/+]on Oct 10, 2022
America/Los_angeles: 2022 dom 13 mar, 2.00 PST → PDT +1 hour (DST start) UTC-7
Problem of documentation: change From 8.1.0 diff convert from local "America/Los_angeles" 2022-10-09 02:41:54.515330 to "UTC local from America/Los_angeles" 2022-10-09 02:41:54.515330. Previous or PHP >= 8.1.10
//If the timezones are not the same, use
absolute(floor(($one->unixTime - $two->unixTime) / 86400))
"UTC" 2022-10-09 09:41:54.515330 @derickr The change creates more breaks than advantages. Please restore 23 hours if timezone != same type. (Never 23 hours is one day for != timezone convert with timezone $originObject and $targetObject UTC).
PHP >= 8.1.10 Timezone same type https://bugs.php.net/bug.php?id=81458
Activity
[-]`DateTimeImmutable::diff` differences on in 8.1.10 onwards[/-][+]`DateTimeImmutable::diff` differences on in 8.1.10 onwards - timezone related.[/+][-]`DateTimeImmutable::diff` differences on in 8.1.10 onwards - timezone related.[/-][+]`DateTimeImmutable::diff` differences in 8.1.10 onwards - timezone related.[/+]hormus commentedon Oct 13, 2022
America/Los_angeles: 2022 dom 13 mar, 2.00 PST → PDT +1 hour (DST start) UTC-7
Problem of documentation: change From 8.1.0 diff convert from local "America/Los_angeles" 2022-10-09 02:41:54.515330 to "UTC local from America/Los_angeles" 2022-10-09 02:41:54.515330. Previous or PHP >= 8.1.10
"UTC" 2022-10-09 09:41:54.515330
@derickr The change creates more breaks than advantages. Please restore 23 hours if timezone != same type. (Never 23 hours is one day for != timezone convert with timezone $originObject and $targetObject UTC).
PHP >= 8.1.10 Timezone same type https://bugs.php.net/bug.php?id=81458
Fixed phpGH-9699, phpGH-9866, and phpGH-9880 (problems with diff); and …
derickr commentedon Nov 30, 2022
Now fixed, for PHP 8.1.14 and PHP 8.2.1.