Closed jorgecastro05 closed 5 months ago
Why would TZ be important for an s2i?
Hello @cescoffier, thanks for the response.
We are actually in a large mature project. We are "recently" migrating applications from SpringBoot to Quarkus 3 (based on Camel) on Openshift. We use the TZ environment variable to manage some of those applications with a specific time zone due to business requirements. Most of those paths use Java libraries like java.util.Date, so if we implement a new Date() in a Quarkus Native application, the result will be a UTC date, not the time zone we used as a focus.
This is the purpose of the ticket because of the TZ environment variable that is commonly implemented and used by the JDK 17 image for JVM builds.
Thanks.
So, it's not in the s2i but in the resulting image your need TZ. Am I correct?
So, it's not in the s2i but in the resulting image your need TZ. Am I correct?
Yes sir. The TZ utiity (guess the "tzdata" package) could be an option to define the OS Timezone when is required, not just for the Camel Context, but all context just as java images... What do you think about it? It would be too heavy for a native image?
It's going to increase the final image size, which is not great. So, we have to see if we can provide an option to do that.
Which s2i is it for? I'm not too worried about the size of the native one, as it's huge already. I'm more concerned about the binary one.
For the native one, it will just be another package in https://github.com/quarkusio/quarkus-images/blob/main/quarkus-native-s2i/src/main/java/io/quarkus/images/QuarkusNativeS2IBuilder.java#L18 (BTW, if you have the package name it would be super useful)
thank you for your help, I have noticed that the package size is about 2Mi, so I made this pull request to include this package #268
Fixed by #268
The package tzdata allows to set the environment variable TZ, so it can be used to change the running container timezone. I would be nice include this package in the image ubi-quarkus-native-binary-s2i in case container needs another timezone on run instead standard UTC.