Skip to content

Commit

Permalink
fix: keep the behavior of Model casts datetime with timestamp
Browse files Browse the repository at this point in the history
It returns Time with the default timezone as before.
  • Loading branch information
kenjis committed Aug 11, 2024
1 parent 57b5112 commit f38d4a3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion system/DataCaster/Cast/TimestampCast.php
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ public static function get(
self::invalidTypeValueError($value);
}

return Time::createFromTimestamp((int) $value);
return Time::createFromTimestamp((int) $value, date_default_timezone_get());
}

public static function set(
Expand Down

0 comments on commit f38d4a3

Please sign in to comment.