Skip to content

Commit 5ccfd4b

Browse files
committed
fix: keep the behavior of Entity casts datetime with timestamp
It returns Time with the default timezone as before.
1 parent c94a95d commit 5ccfd4b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

system/Entity/Cast/DatetimeCast.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ public static function get($value, array $params = [])
4040
}
4141

4242
if (is_numeric($value)) {
43-
return Time::createFromTimestamp((int) $value);
43+
return Time::createFromTimestamp((int) $value, date_default_timezone_get());
4444
}
4545

4646
if (is_string($value)) {

0 commit comments

Comments
 (0)