Skip to content

Commit 06b02bb

Browse files
committed
fix: microseconds are not kept to full precision
1 parent f42b1a0 commit 06b02bb

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

‎system/I18n/TimeTrait.php‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -265,7 +265,7 @@ public static function createFromFormat($format, $datetime, $timezone = null)
265265
*/
266266
public static function createFromTimestamp(float|int $timestamp, $timezone = null, ?string $locale = null): static
267267
{
268-
$time = new static('@' . $timestamp, 'UTC', $locale);
268+
$time = new static(sprintf('@%.6f', $timestamp), 'UTC', $locale);
269269

270270
$timezone ??= 'UTC';
271271

0 commit comments

Comments
 (0)