Skip to content

Commit

Permalink
allow to override started at in from scratch
Browse files Browse the repository at this point in the history
  • Loading branch information
arrilot committed Nov 18, 2021
1 parent 98e59ae commit 673b3ab
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/InitiatorDTO.php
Original file line number Diff line number Diff line change
Expand Up @@ -27,11 +27,12 @@ public static function fromScratch(
string $userType = '',
string $realUserId = '',
string $realUserType = '',
string $correlationId = ''
string $correlationId = '',
string $startedAt = ''
): static {
return new static(
correlationId: $correlationId ?: Uuid::uuid4()->toString(),
startedAt: (new DateTime())->setTimezone(new DateTimeZone("UTC"))->format('Y-m-d\TH:i:s.u\Z'),
startedAt: $startedAt ?: (new DateTime())->setTimezone(new DateTimeZone("UTC"))->format('Y-m-d\TH:i:s.u\Z'),
app: $app,
entrypoint: $entrypoint,
userId: $userId,
Expand Down

0 comments on commit 673b3ab

Please sign in to comment.