* Time quirk, UTC on Java 5
@ 2005-10-29 12:31 Ted Kaczmarek
0 siblings, 0 replies; 3+ messages in thread
From: Ted Kaczmarek @ 2005-10-29 12:31 UTC (permalink / raw)
To: xen-devel
I have been testing java 5 on some apps and I always see utc timezone
for the logging when running these on a xen guest. All the regular
logging timestamps are fine, only the java ones are showing up as UTC.
Same setup on a non xen kernel on the same box the timestamps are fine.
java version "1.5.0_05"
log4j
Any insight here would be appreciated.
Regards,
Ted
^ permalink raw reply [flat|nested] 3+ messages in thread
* RE: Time quirk, UTC on Java 5
@ 2005-10-29 14:26 Ian Pratt
2005-11-07 18:18 ` Ted Kaczmarek
0 siblings, 1 reply; 3+ messages in thread
From: Ian Pratt @ 2005-10-29 14:26 UTC (permalink / raw)
To: Ted Kaczmarek, xen-devel
> I have been testing java 5 on some apps and I always see utc
> timezone for the logging when running these on a xen guest.
> All the regular logging timestamps are fine, only the java
> ones are showing up as UTC.
> Same setup on a non xen kernel on the same box the timestamps
> are fine.
Truly bizzare. The only thing I can think of is if it tries to run
/sbin/hwclock or access /dev/rtc directly. You could try strace'ing it.
Ian
^ permalink raw reply [flat|nested] 3+ messages in thread
* RE: Time quirk, UTC on Java 5
2005-10-29 14:26 Ian Pratt
@ 2005-11-07 18:18 ` Ted Kaczmarek
0 siblings, 0 replies; 3+ messages in thread
From: Ted Kaczmarek @ 2005-11-07 18:18 UTC (permalink / raw)
To: Ian Pratt; +Cc: xen-devel
On Sat, 2005-10-29 at 15:26 +0100, Ian Pratt wrote:
> > I have been testing java 5 on some apps and I always see utc
> > timezone for the logging when running these on a xen guest.
> > All the regular logging timestamps are fine, only the java
> > ones are showing up as UTC.
> > Same setup on a non xen kernel on the same box the timestamps
> > are fine.
>
> Truly bizzare. The only thing I can think of is if it tries to run
> /sbin/hwclock or access /dev/rtc directly. You could try strace'ing it.
>
> Ian
Finally got back to this :-)
xen_changeset : Sun Nov 6 13:50:33 2005 +0100 7628:270469d40f02
dom0 and domU are Centos 4.2 with java version "1.5.0_05" installed.
Test java code
import java.util.Date;
import java.util.TimeZone;
public class TimeTest {
public static void main(String args[]) {
long time = System.currentTimeMillis();
String millis = Long.toString(time);
Date date = new Date(time);
System.out.println("Current time in milliseconds = " + millis +
" => " + date.toString());
System.out.println("Current time zone: " +
TimeZone.getDefault().getID());
}
}
On dom0 returns EST which is local timezone.
On domU returns GMT.
I didn't see rtc or hwclock accesed or used in any of the strace output.
http://paste.ubuntulinux.nl/4185
Nice python script I stumbled across.
http://ubuntu.wordpress.com/2005/09/12/script-to-post-terminal-output-to-pastebin/
Regards,
Ted
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2005-11-07 18:18 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-10-29 12:31 Time quirk, UTC on Java 5 Ted Kaczmarek
-- strict thread matches above, loose matches on Subject: below --
2005-10-29 14:26 Ian Pratt
2005-11-07 18:18 ` Ted Kaczmarek
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.