Skip to content
This repository has been archived by the owner on May 3, 2024. It is now read-only.

Commit

Permalink
Merge pull request #365 from zalando-nakadi/forbidden-api-fix
Browse files Browse the repository at this point in the history
Fix forbiddenApi usage of DateTime.now in fahrschein-example
  • Loading branch information
MALPI authored Sep 17, 2022
2 parents 4a8357e + 9d277c7 commit d8dd881
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
import java.io.IOException;
import java.net.URI;
import java.time.OffsetDateTime;
import java.time.ZoneOffset;
import java.util.ArrayList;
import java.util.List;
import java.util.Map;
Expand Down Expand Up @@ -65,7 +66,7 @@ private static void produceEvents() throws IOException, InterruptedException {
Map<String, String> carrierContext = OpenTelemetryHelper.currentContextToMap();
List<OrderCreatedEvent> events = new ArrayList<>();
for (int i = 0; i < 10; i++) {
Metadata metadata = new Metadata(UUID.randomUUID().toString(), OffsetDateTime.now(), "sample-flow-id", carrierContext);
Metadata metadata = new Metadata(UUID.randomUUID().toString(), OffsetDateTime.now(ZoneOffset.UTC), "sample-flow-id", carrierContext);
events.add(new OrderCreatedEvent(metadata, "123", Money.of(123, "EUR"), "1234", "paypal"));
}
LOG.info("publishing {} events", events.size());
Expand Down

0 comments on commit d8dd881

Please sign in to comment.