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
bendavies
changed the title
DateTimeImmutable::diff differences on in 8.1.10 onwardsDateTimeImmutable::diff differences on in 8.1.10 onwards - timezone related.
Oct 10, 2022
bendavies
changed the title
DateTimeImmutable::diff differences on in 8.1.10 onwards - timezone related.DateTimeImmutable::diff differences in 8.1.10 onwards - timezone related.
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
Description
The following code:
Resulted in this output:
But I expected this output instead:
https://3v4l.org/Jam7q
PHP Version
8.1.10
Operating System
No response
The text was updated successfully, but these errors were encountered: