Weird, it looks likes java is showing two different time zones. What version of Java are you using?
Are you in EST or Australia/Sydney timezone? Check /etc/sysconfig/clock for timezone entry and correct if wrong. this is mine: ZONE="America/Los_Angeles" On Apr 15, 2012, at 9:28 PM, Garth Mollett wrote: > Doesn't look like it. > > If you look at the original code I posted, the issue appears to be in > the usage of java.text.DateFormat. However not being a java person I > don't know if it's being misused in OpenNMS or if the issue is with Java > itself (or another layer, perhaps the OS timezone data files or something). > > Here is the results of running your test though in case I am missing > something: > > > gmollett@onms:~$ locale > LANG=en_AU.UTF-8 > LANGUAGE= > LC_CTYPE="en_AU.UTF-8" > LC_NUMERIC="en_AU.UTF-8" > LC_TIME="en_AU.UTF-8" > LC_COLLATE="en_AU.UTF-8" > LC_MONETARY="en_AU.UTF-8" > LC_MESSAGES="en_AU.UTF-8" > LC_PAPER="en_AU.UTF-8" > LC_NAME="en_AU.UTF-8" > LC_ADDRESS="en_AU.UTF-8" > LC_TELEPHONE="en_AU.UTF-8" > LC_MEASUREMENT="en_AU.UTF-8" > LC_IDENTIFICATION="en_AU.UTF-8" > LC_ALL= > gmollett@onms:~$ java TimeTest > Current time in milliseconds = 1334549666188 => Mon Apr 16 14:14:26 EST 2012 > Current time zone: Australia/Sydney > gmollett@onms:~$ export LANG=C > gmollett@onms:~$ locale > LANG=C > LANGUAGE= > LC_CTYPE="C" > LC_NUMERIC="C" > LC_TIME="C" > LC_COLLATE="C" > LC_MONETARY="C" > LC_MESSAGES="C" > LC_PAPER="C" > LC_NAME="C" > LC_ADDRESS="C" > LC_TELEPHONE="C" > LC_MEASUREMENT="C" > LC_IDENTIFICATION="C" > LC_ALL= > gmollett@onms:~$ java TimeTest > Current time in milliseconds = 1334549679581 => Mon Apr 16 14:14:39 EST 2012 > Current time zone: Australia/Sydney > gmollett@onms:~$ date > Mon Apr 16 14:14:43 EST 2012 > > > > On 16/04/12 1:46 PM, Corey Osman wrote: >> 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()); >> } >> } > > > ------------------------------------------------------------------------------ > For Developers, A Lot Can Happen In A Second. > Boundary is the first to Know...and Tell You. > Monitor Your Applications in Ultra-Fine Resolution. Try it FREE! > http://p.sf.net/sfu/Boundary-d2dvs2 > _______________________________________________ > Please read the OpenNMS Mailing List FAQ: > http://www.opennms.org/index.php/Mailing_List_FAQ > > opennms-devel mailing list > > To *unsubscribe* or change your subscription options, see the bottom of this > page: > https://lists.sourceforge.net/lists/listinfo/opennms-devel ------------------------------------------------------------------------------ For Developers, A Lot Can Happen In A Second. Boundary is the first to Know...and Tell You. Monitor Your Applications in Ultra-Fine Resolution. Try it FREE! http://p.sf.net/sfu/Boundary-d2dvs2 _______________________________________________ Please read the OpenNMS Mailing List FAQ: http://www.opennms.org/index.php/Mailing_List_FAQ opennms-devel mailing list To *unsubscribe* or change your subscription options, see the bottom of this page: https://lists.sourceforge.net/lists/listinfo/opennms-devel