Jack-Qin-King commented on issue #18015: URL: https://github.com/apache/dolphinscheduler/issues/18015#issuecomment-4022710949
i find other question use addDays also have problem <img width="1203" height="628" alt="Image" src="https://github.com/user-attachments/assets/ea17b993-97c1-4bb7-a20d-cdaeacca791f" /> here is my test case ` TimeZone.setDefault(TimeZone.getTimeZone("America/Los_Angeles")); // 方法1: 使用 java.time 包 (推荐,Java 8+) ZonedDateTime laDateTime = ZonedDateTime.of( 2026, 3, 9, // 年, 月, 日 2, 40, 58, // 时, 分, 秒 0, // 纳秒 ZoneId.of("America/Los_Angeles") // 洛杉矶时区 ); // 转换为 Date 对象 Date businessDate = Date.from(laDateTime.toInstant()); businessDate = addDays(businessDate, -1);` -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
