Woof!
On Wed, 03 Sep 2008 03:44:42 -0400, Mcdaid, Paul (GAL:IE319)
<[EMAIL PROTECTED]> wrote:
>> Any "time" displayed by sipXconfig is one hour less than the actual
>> current time.
> The current time is not UTC as we've added an hour due to Daylight
> Savings Time. This probably explains why you're seeing time an hour less
> than actual time.
No, that isn't it. The system hardware knows the correct time (in UTC),
and is converting correctly on the command line and in "C" code. It's
only Java that is off by an hour. Further investigation shows it's not
just sipXconfig, but sipxivr as well, which I've previously extensivly
tested for time correctness. So something is different now that my
machine has been moved...most likely something to do with DHCP.
>
>> /etc/sysconfig/clock contents are:
>> # The ZONE parameter is only evaluated by system-config-date.
>> # The time zone of the system is defined by the contents of
> /etc/localtime.
>> ZONE="America/New York"
>> UTC=true
>> ARC=false
> If the hardware clock isn't using UTC then I would set UTC=false
The hardware clock is using UTC.
> What time is shown when you run "date" command in putty?
$ date -u; date
Wed Sep 3 13:39:00 UTC 2008
Wed Sep 3 09:39:00 EDT 2008
UTC is correct. EDT is correct.
But check out this line from the sipxivr log:
"2008-09-03T13:33:17.394000Z":6:sipXivr:INFO:woof:Thread-0:00000000:sipxivr:"Using
after hours AutoAttendant as Wed 08:33 is after hours"
So the logged time as 13:33 UTC (which was correct). The converted local
time was "08:33" which is incorrect, the local time was 09:33 EDT.
The local time comes from this statement:
Date now = Calendar.getInstance().getTime();
And the Javadoc for Calendar.getInstance() is thus:
Gets a calendar using the default time zone and locale. The Calendar
returned is based on the current time in the default time zone with the
default locale.
So something is amiss with Java's interpretation of the default time zone.
This worked correctly before I moved my machine to the mother ship.
--Woof!
_______________________________________________
sipx-dev mailing list
[email protected]
List Archive: http://list.sipfoundry.org/archive/sipx-dev
Unsubscribe: http://list.sipfoundry.org/mailman/listinfo/sipx-dev