Custom time source with the Go SDK?

Hi there,

I have a use case where I want to run my deployed workflow with a fake wall-clock time, to emulate how my software would behave in the past or future. Specifically I’d like to make sure that temporal_workflow.Now(ctx) returns values set by a fake clock I control, and that workflow.Sleep and such also use the fake clock.

Is there any way to provide a custom time source for Temporal workflows using the Go SDK?

Would you file an issue against go-sdk to get this added?

BTW Java does support this already through TestEnvironmentOptions.setInitialTimeMillis.

(post deleted by author)

Thanks for the quick response! Opened an issue at Allow custom time source · Issue #929 · temporalio/sdk-go · GitHub