Repository: kestra-io/kestra (java)

Issue:
Backfills don't work if trigger has a timezone set
### Describe the issue

If you have a trigger set up using the `timezone` property like the example below:
```yaml
triggers:
  - id: green_schedule
    type: io.kestra.plugin.core.trigger.Schedule
    cron: "0 9 1 * *"
    timezone: Europe/Berlin
    inputs:
      taxi: green
```
It displays correctly inside of the **Triggers tab** for the next Scheduled execution
![Image](https://github.com/user-attachments/assets/6bc3d24f-9185-4cf9-9bb6-8618f0b75069)

However, if you run a Backfill with a valid range, it will let you start it and claims it finished, but no executions were created.

In this video, I set up a Backfill between 1st January 2019 and the 31st March 2019. It should have 3 separate executions created, yet when we refresh the Triggers page, it shows the backfill as complete and the Executions page remains empty.

https://github.com/user-attachments/assets/2c7236a5-e303-409f-b5ac-a0b0f872cbb4

Full flow can be found here, but you will need to add the `timezone` property like above: https://github.com/DataTalksClub/data-engineering-zoomcamp/blob/main/02-workflow-orchestration/flows/02_postgres_taxi_scheduled.yaml

### Environment

- Kestra Version: `latest` 0.21 OSS pulled today


Pull request description:
fix(core): #7227 cron schedule with timezone and backfile not triggering
<!-- Thanks for submitting a Pull Request to Kestra. To help us review your contribution, please follow the guidelines below:

- Make sure that your commits follow the [conventional commits](https://www.conventionalcommits.org/en/v1.0.0/) specification e.g. `feat(ui): add a new navigation menu item` or `fix(core): fix a bug in the core model` or `docs: update the README.md`. This will help us automatically generate the changelog.
- The title should briefly summarize the proposed changes.
- Provide a short overview of the change and the value it adds.
- Share a flow example to help the reviewer understand and QA the change.
- Use "closes" to automatically close an issue. For example, `closes #1234` will close issue #1234. -->

### What changes are being made and why?

<!-- Please include a brief summary of the changes included in this PR e.g. closes #1234. -->
Fixes #7227
---

### How the changes have been QAed?

<!-- Include example code that shows how this PR has been QAed. The code should present a complete yet easily reproducible flow.

```yaml
# Your example flow code here
```

Note that this is not a replacement for unit tests but rather a way to demonstrate how the changes work in a real-life scenario, as the end-user would experience them.

Remove this section if this change applies to all flows or to the documentation only. -->

---

### Setup Instructions

<!--If there are any setup requirements like API keys or trial accounts, kindly include brief bullet-points-description outlining the setup process below.

- [External System Documentation](URL)
- Steps to set up the necessary resources

If there are no setup requirements, you can remove this section.

Thank you for your contribution. ❤️  -->


Patch:
diff --git a/core/src/main/java/io/kestra/plugin/core/trigger/Schedule.java b/core/src/main/java/io/kestra/plugin/core/trigger/Schedule.java
index 0cd7f5dba..a38b24fa5 100644
--- a/core/src/main/java/io/kestra/plugin/core/trigger/Schedule.java
+++ b/core/src/main/java/io/kestra/plugin/core/trigger/Schedule.java
@@ -344,7 +344,7 @@ public class Schedule extends AbstractTrigger implements Schedulable, TriggerOut
             if (backfill.getPaused()) {
                 return Optional.empty();
             }
-            currentDateTimeExecution = backfill.getCurrentDate();
+            currentDateTimeExecution = convertDateTime(backfill.getCurrentDate());
         }
 
         Output scheduleDates = this.scheduleDates(executionTime, currentDateTimeExecution).orElse(null);


Test patch:
diff --git a/core/src/test/java/io/kestra/plugin/core/trigger/ScheduleTest.java b/core/src/test/java/io/kestra/plugin/core/trigger/ScheduleTest.java
index 83baa1993..5d2fe2449 100644
--- a/core/src/test/java/io/kestra/plugin/core/trigger/ScheduleTest.java
+++ b/core/src/test/java/io/kestra/plugin/core/trigger/ScheduleTest.java
@@ -449,6 +449,30 @@ class ScheduleTest {
         assertThat(dateFromVars(vars.get("previous"), date), is(date.minusMonths(1)));
     }
 
+    //todo
+    @Test
+    void timezone_with_backfile() throws Exception {
+        Schedule trigger = Schedule.builder()
+            .id("schedule")
+            .cron(TEST_CRON_EVERYDAY_AT_8)
+            .timezone("America/New_York")
+            .build();
+
+        TriggerContext triggerContext = triggerContext(ZonedDateTime.now(), trigger).toBuilder()
+            .backfill(Backfill
+                .builder()
+                .currentDate(ZonedDateTime.now(ZoneId.of("America/New_York")).with(LocalTime.MIN).plus(Duration.ofHours(8)).withZoneSameInstant(ZoneId.systemDefault()))
+                .end(ZonedDateTime.now().with(LocalTime.MAX))
+                .build()
+            )
+            .build();
+        // When
+        Optional<Execution> result = trigger.evaluate(conditionContext(trigger), triggerContext);
+
+        // Then
+        assertThat(result.isPresent(), is(true));
+    }
+
 
 
     private ConditionContext conditionContext(AbstractTrigger trigger) {