Additional source to guess the local timezone ID on linux

2013-08-23 Thread Omair Majid
Hi, The algorithm that OpenJDK uses to guess the local timezone ID on Linux goes like this: 1. If TZ environment variable is set, use that 2. If /etc/timezone is readable, read the time zone from there 3. If /etc/localtime is a symlink, resolve that, and use the name to guess the time zone. 4. Sc

Re: Additional source to guess the local timezone ID on linux

2013-08-25 Thread David Holmes
On 24/08/2013 7:09 AM, Omair Majid wrote: Hi, The algorithm that OpenJDK uses to guess the local timezone ID on Linux goes like this: 1. If TZ environment variable is set, use that 2. If /etc/timezone is readable, read the time zone from there 3. If /etc/localtime is a symlink, resolve that, an

Re: Additional source to guess the local timezone ID on linux

2013-08-25 Thread Omair Majid
Hi David, Thanks for looking at the patch! On 08/25/2013 09:59 PM, David Holmes wrote: > On 24/08/2013 7:09 AM, Omair Majid wrote: >> The algorithm that OpenJDK uses to guess the local timezone ID on Linux >> goes like this: >> >> 1. If TZ environment variable is set, use that >> 2. If /etc/timez

Re: Additional source to guess the local timezone ID on linux

2013-08-25 Thread David Holmes
Hi Omair, I have reservations about this but will let others comment. Looking at the code, readEntireFile doesn't close the file if it returns -ENOMEM. It also doesn't free the allocated memory if it returns -ENOMEM or via the goto fail path. (I'm not a fan of this goto fail style either.) T

Re: Additional source to guess the local timezone ID on linux

2013-08-26 Thread Alan Bateman
Including i18n-dev on this discussion because that is where this code is maintained. On 23/08/2013 22:09, Omair Majid wrote: Hi, The algorithm that OpenJDK uses to guess the local timezone ID on Linux goes like this: 1. If TZ environment variable is set, use that 2. If /etc/timezone is rea

Re: Additional source to guess the local timezone ID on linux

2013-08-27 Thread Masayoshi Okutsu
Hi Omair, /etc/sysconfig/clock used to be supported, but it was removed in JDK 7. The problem is discussed in bug #6456628. http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=6456628 Have you tested your fix on all Red Hat-like distros, including some older releases, with all the time zone I

Re: Additional source to guess the local timezone ID on linux

2013-08-27 Thread Omair Majid
On 08/27/2013 03:00 AM, Masayoshi Okutsu wrote: > /etc/sysconfig/clock used to be supported, but it was removed in JDK 7. > The problem is discussed in bug #6456628. > > http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=6456628 Thanks for that link. I did not know that this support was present i

Re: Additional source to guess the local timezone ID on linux

2013-08-28 Thread Andrew Hughes
- Original Message - > On 08/27/2013 03:00 AM, Masayoshi Okutsu wrote: > > /etc/sysconfig/clock used to be supported, but it was removed in JDK 7. > > The problem is discussed in bug #6456628. > > > > http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=6456628 > > Thanks for that link. I d