java-sdk icon indicating copy to clipboard operation
java-sdk copied to clipboard

ZonedDateTime is not supported for Create Timer

Open salaboy opened this issue 6 months ago • 4 comments

Expected Behavior

I should be able to create a timer for a ZonedDateTime.

Actual Behavior

Behavior not implemented.

Steps to Reproduce the Problem

Create a workflow that use a timer:

ZonedDateTime now = ZonedDateTime.now();
//Let's create a ZonedDateTime 30 seconds in the future
ZonedDateTime inTheFuture = now.plusSeconds(30);
ctx.getLogger().info("Starting the timer at: {}", new Date());
ctx.createTimer(inTheFuture).await();
ctx.getLogger().info("Finishing the timer at: {}", new Date());

Release Note

RELEASE NOTE:

salaboy avatar Jun 10 '25 01:06 salaboy

PR in durable task needs to be merged and released: https://github.com/dapr/durabletask-java/pull/26

salaboy avatar Jun 10 '25 05:06 salaboy

it looks to be supported. I see an integration test here with it being used, but it looks a bit confusing with the unsupported line you are changing

cicoyle avatar Jun 10 '25 21:06 cicoyle

@cicoyle I reached out to the original author on Discord and I got an answer from: x0n here: https://discord.com/channels/778680217417809931/1075836407156850698/1381813125522915511

From your comment, I don't understand if you are requesting a change or if the PR in durable-tasks is ready to be merged

salaboy avatar Jun 11 '25 02:06 salaboy

This PR: https://github.com/dapr/java-sdk/pull/1413 depends on https://github.com/dapr/durabletask-java/pull/26 and https://github.com/dapr/java-sdk/pull/1405

salaboy avatar Jun 11 '25 02:06 salaboy