>> <alberto....@gmail.com> wrote:
>> >As I said both system clock and TZ appear to be correct .
[quoted text clipped - 17 lines]
>> epoch values (which are timezone-agnostic). I suspect something's
>> wrong with your timezone definition either in the VM or in the OS.
Looks like you might be onto something here...
> Here are the results:
>
[quoted text clipped - 6 lines]
> # date "+%Z (%z)"
> Europe/Rome (+0000)
Here, I get:
$ date "+%Z (%z)"
GMT (+0000)
$ export TZ="Europe/Rome"
$ date "+%Z (%z)"
CET (+0100)
It looks as though the zoneinfo, or your setting of TZ, is incorrect.
What happens if you unset TZ?
TZ should not be needed in a correctly configured RH setup.
> # java PrintTime
> TZ id: Europe/Rome
[quoted text clipped - 9 lines]
> Date toString: Tue Jan 08 09:55:58 CET 2008
> SDF: 8 Jan 2008 09:55:58 CET(+0100)
So the Java timezone is correct.

Signature
Nigel Wade, System Administrator, Space Plasma Physics Group,
University of Leicester, Leicester, LE1 7RH, UK
E-mail : nmw@ion.le.ac.uk
Phone : +44 (0)116 2523548, Fax : +44 (0)116 2523555
Mark Rafn - 08 Jan 2008 23:22 GMT
>It looks as though the zoneinfo, or your setting of TZ, is incorrect.
And perhaps your system clock too.
My theory is that your system has the clock set one hour too early, and the
system timezone file hacked to have the CET offset one hour off.
>What happens if you unset TZ?
TZ=UTC date
Should be informative. If it gives you correct UTC (aka GMT) time, then
my theory is wrong.
>> # java PrintTime
...
>> seconds since epoch: 1199782558
This epoch time is Tue Jan 8 08:55:58 2008 UTC.
>> Date toString: Tue Jan 08 09:55:58 CET 2008
Which is 9:55 CET. Good.
>So the Java timezone is correct.
Yup. Java is behaving just fine.
THIS is just wrong:
>> # date +%s
>> 1199782449
Epoch time 1199782449 is Tue Jan 8 08:54:09 2008 GMT or 9:54:09 CET.
>> # date +%c
>> Tue 08 Jan 2008 08:54:14 AM Europe/Rome
This is incorrectly reporting an hour earlier than the system clock says.
>> # date "+%Z (%z)"
>> Europe/Rome (+0000)
And this says your timezone has no offset from UTC. Which is wrong.
Fix your system timezone files, and fix your system clock.
--
Mark Rafn dagon@dagon.net <http://www.dagon.net/>
alberto.poz@gmail.com - 09 Jan 2008 07:44 GMT
> alberto....@gmail.com wrote:
> >> <alberto....@gmail.com> wrote:
[quoted text clipped - 66 lines]
> E-mail : n...@ion.le.ac.uk
> Phone : +44 (0)116 2523548, Fax : +44 (0)116 2523555
Finally the mistery is solved.
/usr/share/zoneinfo/Europe/Rome was corrupted (0 in size). Replaced it
everything works fine.
Thank to everybody.