Egypt has reintroduced Day light saving time from April 28, 2023 and We are using Java 11 version in the Spring boot application. DST is not getting applied to the time since it is not enabled in the used tz library. Anyone can help to fix this issue in the java 11 version?
//Code sample:
String tz = TimeZone.getTimeZone(timeZone);
if(tz.useDaylightTime()){ // returning false here
// need to add dst here
e.g date.plus(tz.dstSavings.toLong(), MILLIS);
}
I had tried to create custom timezone for Egypt only but the application is supporting multiple countries so it wasn't a permanent solution.