Skip to content

v4.2.1

Latest
Compare
Choose a tag to compare
@calmohallag calmohallag released this 13 Jan 11:12
· 9 commits to master since this release
abeffb9

fix: prevent generate not UTC datetime

This value object was thinking for use UTC as TimeZone standar. However, it allow set other timezone by passing it on "from" factory:

$date = DateTimeValueObject::from('2025-01-10T15:16:11+01:00')

echo $date->format(\DATE_ATOM) ; // result 2025-01-10T15:16:11+01:00

Before this fix, date was transformed to UTC, expected result: 2025-01-10T14:16:11+00:00