<i18n dev> RFR: 8223490: Optimize search algorithm for determining default time zone
Seán Coffey
sean.coffey at oracle.com
Wed Sep 11 10:50:00 UTC 2019
The current algorithm for determining the default timezone on (non-AIX)
unix systems goes something like :
1. If TZ environment variable is defined, use it
2. else if /etc/timezone exists, use the value contained within it
3. else if /etc/localtime exists and is a symbolic link, use the name
pointed to
4. else if /etc/localtime is a binary, find the first identical time
zone binary file in /usr/share/zoneinfo/
Step 4 is a bit crude in that the zoneinfo directory can contain over
1,800 files on today's systems. I'd like to change the logic so that
common timezones are first checked for buffer matching before a full
directory traversal is performed. It should be a performance gain and it
should also lead to more consistent results for reasons outlined in the
bug report.
https://bugs.openjdk.java.net/browse/JDK-8223490
webrev: http://cr.openjdk.java.net/~coffeys/webrev.8223490/webrev/
<http://cr.openjdk.java.net/%7Ecoffeys/webrev.8223490/webrev/>
--
Regards,
Sean.
More information about the i18n-dev
mailing list