Skip to content

Commit 02a39c3

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

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

system/DataCaster/Cast/TimestampCast.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ public static function get(
3232
self::invalidTypeValueError($value);
3333
}
3434

35-
return Time::createFromTimestamp((int) $value);
35+
return Time::createFromTimestamp((int) $value, date_default_timezone_get());
3636
}
3737

3838
public static function set(

0 commit comments

Comments
 (0)