Clarification of Temporal Schedule behaviour while using ScheduleInterval

Hi everyone, we are implementing a feature using temporal schedules where we can define that a workflow should repeat at evey X time interval. I’m having some trouble while creating a weekly interval, as the first execution is always been scheduled for the next day first, then every week as I would expect. Could anyone provide some clarification on this behaviour ? I could not find anything in the docs.

The code im using is basically as follows

    var scheduleSpec =
        ScheduleSpec.newBuilder()
            .setStartAt(OffsetDateTime.now().toInstant())
             .setIntervals(List.of(new ScheduleIntervalSpec(Duration.of(7 , ChronoUnit.DAYS));

     var schedule =  Schedule.newBuilder().setAction(action).setSpec(scheduleSpec.build()).build();
      scheduleClient.createSchedule(
          scheduleRunId,
          schedule,
          ScheduleOptions.newBuilder().build());

Running it at 2024-10-23 give me the following upcoming runs

I would expect that the first run should have been at 2024-10-30 instead of 2024-10-24.

Could someone explain why it is scheduled to run at the next day ?

Thanks in advance!

When I posted I got recommended this post here

The github discussion mentioned led to me finding that this seems to work in java. There were no phase parameter in java, but i implied it were the offset

var offset = getNextDate().toInstant().getEpochSecond()
          % (60L * 60L * 24L * 7L * recurrence.getInterval());
        scheduleSpec.setIntervals(List.of(new
            ScheduleIntervalSpec(Duration.ofDays(7L * recurrence.getInterval()),
            Duration.ofSeconds(offset))));

EDIT: Strangely when we start to get in the month range this formula seems not to work 100%. The original situal started to happen again.