Skip to content

Commit f38d4a3

Browse files
committed
fix: keep the behavior of Model casts datetime with timestamp
It returns Time with the default timezone as before.
1 parent 57b5112 commit f38d4a3

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

‎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)