|
Joe -- QUTCOFFSET specifies the difference between UTC and the current system time. If you set QUTCOFFSET to -6:00, it means that your system is running 6 hours behind UTC. UTC is 6 hours ahead of your system. Java uses the system property user.timezone to determine it's current timezone. Normally, this isn't set to anything so java assumes that the -local- system time is UTC. To compute your local time (assuming you're in the US), it will subtract AGAIN from the current time in the calculations. You need to set the system property user.timezone appropriately. You can initialize this value in /QIBM/UserData/Java400/SystemDefault.properties. I'm in Los Angeles and use user.timezone=America/Los_Angeles HTH, Gary > -----Original Message----- > From: java400-l-bounces@xxxxxxxxxxxx > [mailto:java400-l-bounces@xxxxxxxxxxxx] On Behalf Of Joe Pluta > Sent: Monday, January 12, 2004 7:29 PM > To: 'Java Programming on and around the iSeries / AS400' > Subject: UTC and the JVM > > > Okay, I'm getting a little kookie here. > > I have a system value, QUTCOFFSET. If I do NOT set this to > -06:00, any updates to the IFS look a little bizarre in > Windows Explorer - in fact, any files in the IFS look as if > they were updated six hours previously. > > If I DO change my QUTCOFFSET, the times are fine in the IFS, > but now my JVM consistently shows times as being six hours > previous (this is actually very weird - if anything, I'd > expect them to be six hours LATER). > > I assume it's because I'm getting the time in my Java program > incorrectly; how does one get the time in a JVM when the UTC > offset is set? > > Joe > > _______________________________________________ > This is the Java Programming on and around the iSeries / > AS400 (JAVA400-L) mailing list To post a message email: > JAVA400-L@xxxxxxxxxxxx To subscribe, unsubscribe, or change > list options, > visit: http://lists.midrange.com/mailman/listinfo/java400-l > or email: JAVA400-L-request@xxxxxxxxxxxx > Before posting, please take a moment to review the archives > at http://archive.midrange.com/java400-l. >
As an Amazon Associate we earn from qualifying purchases.
This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].
Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.