Skip to content

Commit 673b3ab

Browse files
committed
allow to override started at in from scratch
1 parent 98e59ae commit 673b3ab

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/InitiatorDTO.php

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,11 +27,12 @@ public static function fromScratch(
2727
string $userType = '',
2828
string $realUserId = '',
2929
string $realUserType = '',
30-
string $correlationId = ''
30+
string $correlationId = '',
31+
string $startedAt = ''
3132
): static {
3233
return new static(
3334
correlationId: $correlationId ?: Uuid::uuid4()->toString(),
34-
startedAt: (new DateTime())->setTimezone(new DateTimeZone("UTC"))->format('Y-m-d\TH:i:s.u\Z'),
35+
startedAt: $startedAt ?: (new DateTime())->setTimezone(new DateTimeZone("UTC"))->format('Y-m-d\TH:i:s.u\Z'),
3536
app: $app,
3637
entrypoint: $entrypoint,
3738
userId: $userId,

0 commit comments

Comments
 (0)