I have a workflow with ZonedDatetime of UTC as an argument. During the unit test with test env, I see the UTC zone is dropped while running the workflow. What would be the cause of this behavior?
[UPDATE] It turns out the timezone is not dropped, but somehow converted to Zone id of "Z" instead of the original "UTC", although they're basically the same. Sample code,
data class WorkflowArgs(
val currentTime: ZonedDateTime
)
class WorkflowImpl {
override fun execute(workflowArgs: WorkflowArgs) {
activityStub.doSomeActivity(
workflowArgs.currentTime // Zone ID of "Z"
)
}
}
WorkflowClient.start(workflowStub::execute, WorkflowArgs(ZonedDateTime.now(ZoneId.of("UTC"))) // Zone ID of "UTC"