Skip to content

Added the fix for LDEV-5314(set Asia/Kolkata for Indian zone Id) #2511

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: 7.0
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion core/src/main/java/lucee/runtime/engine/InfoImpl.java
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,8 @@ public static long parseDateTime(String dateStr) {
Integer.parseInt(dateStr.substring(index4 + 1, index5)), // minute
Integer.parseInt(dateStr.substring(index5 + 1, index6)) // second
);
return ldt.atZone(ZoneId.of(dateStr.substring(index6 + 1))).toInstant().toEpochMilli();
String zone = "IST".equals(dateStr.substring(index6 + 1)) ? "Asia/Kolkata" : dateStr.substring(index6 + 1);
return ldt.atZone(ZoneId.of(zone)).toInstant().toEpochMilli();
}
// fallback (slower, but more forgiving)
DateTimeFormatter formatter = DateTimeFormatter.ofPattern("yyyy/MM/dd HH:mm:ss z", Locale.ENGLISH);
Expand Down
Loading