<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Java displays wrong system time. in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/java-displays-wrong-system-time/m-p/3009247#M911409</link>
    <description>We had a problem like this a while back. If TZ is set properly, check the setting of the kernel parameter "timezone", which is used if for some reason a process doesn't get the value of TZ from its calling process. Out of the box, most HP-UX installations have this set to 420 (minutes west of UTC), or MST7MDT. Set it to what your local time should be, recompile the kernel, and reboot.</description>
    <pubDate>Fri, 27 Jun 2003 08:53:14 GMT</pubDate>
    <dc:creator>Erwin Mascardo</dc:creator>
    <dc:date>2003-06-27T08:53:14Z</dc:date>
    <item>
      <title>Java displays wrong system time.</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/java-displays-wrong-system-time/m-p/3009244#M911406</link>
      <description>we are getting incorrect system date and time when displaying it using java. The date command displays the correct system date and time. The same program runs correctly on a different HP machine that has the smae version of java. Any thoughts ideas ???&lt;BR /&gt;# swlist -l bundle&lt;BR /&gt;# Initializing...&lt;BR /&gt;&lt;BR /&gt;  64-bitDevLibs         B.11.00        Cross Platform Development Kit &lt;BR /&gt;  B6256CA               B.11.01.06     HP aC++ Ecom Compiler (S800) &lt;BR /&gt;  BUNDLE                B.11.00        Patch Bundle   &lt;BR /&gt;  HPUXEng32RT           B.11.00        English HP-UX 32-bit Runtime Environment &lt;BR /&gt;  QPK1100               B.11.00.51.01  Quality Pack for HP-UX 11.00 (December 2000) &lt;BR /&gt;  UXCoreMedia           B.11.00        HP-UX Media Kit (Reference Only. See Description) &lt;BR /&gt;  XSWGR1100             B.11.00.52.2   HP-UX General Release Patches, March 2001 &lt;BR /&gt;  Y2K-1100              B.11.00.B0315  HP-UX Core OS Year 2000 Patch Bundle</description>
      <pubDate>Thu, 26 Jun 2003 20:21:42 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/java-displays-wrong-system-time/m-p/3009244#M911406</guid>
      <dc:creator>venkatesh_5</dc:creator>
      <dc:date>2003-06-26T20:21:42Z</dc:date>
    </item>
    <item>
      <title>Re: Java displays wrong system time.</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/java-displays-wrong-system-time/m-p/3009245#M911407</link>
      <description>Hello!&lt;BR /&gt;&lt;BR /&gt;You see the difrence in time that is just like&lt;BR /&gt;your time zone difrence if so than is problem&lt;BR /&gt;of calculate with the timezone.&lt;BR /&gt;Check how the function that you use to get&lt;BR /&gt;time work on unix, what she checks and about&lt;BR /&gt;the timezone.&lt;BR /&gt;&lt;BR /&gt;Caesar</description>
      <pubDate>Thu, 26 Jun 2003 20:36:19 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/java-displays-wrong-system-time/m-p/3009245#M911407</guid>
      <dc:creator>Caesar_3</dc:creator>
      <dc:date>2003-06-26T20:36:19Z</dc:date>
    </item>
    <item>
      <title>Re: Java displays wrong system time.</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/java-displays-wrong-system-time/m-p/3009246#M911408</link>
      <description>System calls to obtain the current time/date depend on the setting of the environment variable: TZ &lt;BR /&gt;All time for HP-UX is kept in GMT (Zulu or UTC) format with no daylight saving jumps. The TZ value causes date/time routines to translate the GMT value using entries in /usr/lib/tztab.&lt;BR /&gt;&lt;BR /&gt;So if you run the Java program from a shell prompt (where date shows correctly) then the Java code should display correctly. Now the question is: how is the Java code run? Is it part of a web page? If so, how is the web server started? In other words, the TZ value must be set for Java (or any executable) to interpret the date/time correctly.</description>
      <pubDate>Thu, 26 Jun 2003 23:55:27 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/java-displays-wrong-system-time/m-p/3009246#M911408</guid>
      <dc:creator>Bill Hassell</dc:creator>
      <dc:date>2003-06-26T23:55:27Z</dc:date>
    </item>
    <item>
      <title>Re: Java displays wrong system time.</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/java-displays-wrong-system-time/m-p/3009247#M911409</link>
      <description>We had a problem like this a while back. If TZ is set properly, check the setting of the kernel parameter "timezone", which is used if for some reason a process doesn't get the value of TZ from its calling process. Out of the box, most HP-UX installations have this set to 420 (minutes west of UTC), or MST7MDT. Set it to what your local time should be, recompile the kernel, and reboot.</description>
      <pubDate>Fri, 27 Jun 2003 08:53:14 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/java-displays-wrong-system-time/m-p/3009247#M911409</guid>
      <dc:creator>Erwin Mascardo</dc:creator>
      <dc:date>2003-06-27T08:53:14Z</dc:date>
    </item>
    <item>
      <title>Re: Java displays wrong system time.</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/java-displays-wrong-system-time/m-p/3009248#M911410</link>
      <description>Hi William,&lt;BR /&gt;&lt;BR /&gt;your problem is almost certainly due to difference between HP-UX timezones and java timezones.&lt;BR /&gt;For example, in HP-UX, MET stands for Middle European Time. However, this stands for Middle East Time in Java.&lt;BR /&gt;&lt;BR /&gt;If your timezone is MET-2METDST, HP-UX will thus think that you're in Europe, while Java will think that you're in the middle-east...&lt;BR /&gt;&lt;BR /&gt;If your problem is this one, you can define by yourself new timezones: check your /usr/lib/tztab file, and your manpage:&lt;BR /&gt;&lt;BR /&gt;&lt;A href="http://docs.hp.com/hpux/onlinedocs/B2355-90682/B2355-90682.html" target="_blank"&gt;http://docs.hp.com/hpux/onlinedocs/B2355-90682/B2355-90682.html&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;Cheers,&lt;BR /&gt;&lt;BR /&gt;FiX&lt;BR /&gt;</description>
      <pubDate>Fri, 27 Jun 2003 10:39:21 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/java-displays-wrong-system-time/m-p/3009248#M911410</guid>
      <dc:creator>F. X. de Montgolfier</dc:creator>
      <dc:date>2003-06-27T10:39:21Z</dc:date>
    </item>
    <item>
      <title>Re: Java displays wrong system time.</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/java-displays-wrong-system-time/m-p/3009249#M911411</link>
      <description>Hi&lt;BR /&gt;&lt;BR /&gt;The problem is not just the time , it shows some day in 2021,22 and so on and a differnt time for each iteration. I will copy the output here.&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;This is the output from the HP-UX machine working correctly.&lt;BR /&gt;&lt;BR /&gt;# java Test&lt;BR /&gt;2003-06-27 09:58:22.817&lt;BR /&gt;2003-06-27 09:58:23.082&lt;BR /&gt;2003-06-27 09:58:23.343&lt;BR /&gt;2003-06-27 09:58:23.602&lt;BR /&gt;2003-06-27 09:58:23.862&lt;BR /&gt;2003-06-27 09:58:24.122&lt;BR /&gt;2003-06-27 09:58:24.382&lt;BR /&gt;2003-06-27 09:58:24.642&lt;BR /&gt;2003-06-27 09:58:24.902&lt;BR /&gt;2003-06-27 09:58:25.163&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;This is the output from the machine thats not working correctly&lt;BR /&gt;&lt;BR /&gt;# java Test&lt;BR /&gt;2015-02-09 18:07:54.494&lt;BR /&gt;2015-12-16 15:28:48.494&lt;BR /&gt;2016-10-12 14:14:32.494&lt;BR /&gt;2017-08-09 12:33:04.494&lt;BR /&gt;2018-06-06 11:09:16.494&lt;BR /&gt;2019-04-03 07:54:16.494&lt;BR /&gt;2020-01-29 06:03:22.494&lt;BR /&gt;2020-11-25 04:16:48.494&lt;BR /&gt;2021-09-22 03:38:36.494&lt;BR /&gt;2022-07-20 05:35:03.494&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;I dont' have any clues about the output. &lt;BR /&gt;&lt;BR /&gt;Thanx guys&lt;BR /&gt;&lt;BR /&gt;-Venkat&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Fri, 27 Jun 2003 12:59:47 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/java-displays-wrong-system-time/m-p/3009249#M911411</guid>
      <dc:creator>venkatesh_5</dc:creator>
      <dc:date>2003-06-27T12:59:47Z</dc:date>
    </item>
    <item>
      <title>Re: Java displays wrong system time.</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/java-displays-wrong-system-time/m-p/3009250#M911412</link>
      <description>The output from the Java code is defintely trash. Timzones will simply adjust the hour but the above output is virtually random dates and times--except for the fraction of one second which is always .494 and that may be significant. My guess is that this is a basic coding error, perhaps a misaligned index or pointer or the wrong type of argument for the system call.  The problem isn't related to any kernel settings. Might be Java patches or versions for Java support linraries.</description>
      <pubDate>Fri, 27 Jun 2003 13:38:38 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/java-displays-wrong-system-time/m-p/3009250#M911412</guid>
      <dc:creator>Bill Hassell</dc:creator>
      <dc:date>2003-06-27T13:38:38Z</dc:date>
    </item>
    <item>
      <title>Re: Java displays wrong system time.</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/java-displays-wrong-system-time/m-p/3009251#M911413</link>
      <description>The first thing that I notice is that the values in the "bad" example show a constant value in the milliseconds field - the least significant section. This strongly suggests a byte alignment problem. &lt;BR /&gt;&lt;BR /&gt;I would compare the two machines veryt carefully. Same OS "bitness"; exactly the same patch levels even on seemingly unrelated patches.&lt;BR /&gt;&lt;BR /&gt;As a first test, I would also display the output from a method that returns epoch seconds (seconds since 00:00 1 Jan 1970). That would really give you a clue as to whether the time itself is wrong or how it is displayed.&lt;BR /&gt;</description>
      <pubDate>Fri, 27 Jun 2003 13:38:53 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/java-displays-wrong-system-time/m-p/3009251#M911413</guid>
      <dc:creator>A. Clay Stephenson</dc:creator>
      <dc:date>2003-06-27T13:38:53Z</dc:date>
    </item>
    <item>
      <title>Re: Java displays wrong system time.</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/java-displays-wrong-system-time/m-p/3009252#M911414</link>
      <description>Both the machines have the same version of Java. The only thing I see different between them is the following bundle. I don't see this bundle on the machine that doesn't work correctly. &lt;BR /&gt;&lt;BR /&gt; B8110AA               1.2.2.04.01    Java 2 SDK for HP-UX (700/800), PA1.1 + PA2.0 Add On&lt;BR /&gt;&lt;BR /&gt;I am not able  to find this bundle to download. Pls let me know if any of you guys know where to download it from.&lt;BR /&gt;&lt;BR /&gt;Thanx&lt;BR /&gt;&lt;BR /&gt;-Venkat</description>
      <pubDate>Fri, 27 Jun 2003 16:12:49 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/java-displays-wrong-system-time/m-p/3009252#M911414</guid>
      <dc:creator>venkatesh_5</dc:creator>
      <dc:date>2003-06-27T16:12:49Z</dc:date>
    </item>
    <item>
      <title>Re: Java displays wrong system time.</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/java-displays-wrong-system-time/m-p/3009253#M911415</link>
      <description>Hello!&lt;BR /&gt;&lt;BR /&gt;You could find it on aplication cd from 03/02&lt;BR /&gt;&lt;BR /&gt;Caesar</description>
      <pubDate>Fri, 27 Jun 2003 16:45:12 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/java-displays-wrong-system-time/m-p/3009253#M911415</guid>
      <dc:creator>Caesar_3</dc:creator>
      <dc:date>2003-06-27T16:45:12Z</dc:date>
    </item>
    <item>
      <title>Re: Java displays wrong system time.</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/java-displays-wrong-system-time/m-p/3009254#M911416</link>
      <description>No luck even after installing it. Would this be a hardware failure by any chance ??&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;-Venkat</description>
      <pubDate>Fri, 27 Jun 2003 17:32:39 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/java-displays-wrong-system-time/m-p/3009254#M911416</guid>
      <dc:creator>venkatesh_5</dc:creator>
      <dc:date>2003-06-27T17:32:39Z</dc:date>
    </item>
    <item>
      <title>Re: Java displays wrong system time.</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/java-displays-wrong-system-time/m-p/3009255#M911417</link>
      <description>Not a chance because the UNIX date command works perfectly. This is bad code somewhere. Again, if you can modify the Java to display epoch seconds and see if that make sense then you are partway to finding your answer. Is one box running 32-bit 11.0 and the other 64-bit?&lt;BR /&gt;&lt;BR /&gt;Your Quality Packs are also quite old.</description>
      <pubDate>Fri, 27 Jun 2003 18:52:37 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/java-displays-wrong-system-time/m-p/3009255#M911417</guid>
      <dc:creator>A. Clay Stephenson</dc:creator>
      <dc:date>2003-06-27T18:52:37Z</dc:date>
    </item>
    <item>
      <title>Re: Java displays wrong system time.</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/java-displays-wrong-system-time/m-p/3009256#M911418</link>
      <description>Hello!&lt;BR /&gt;&lt;BR /&gt;No it could not be problem of hardware!&lt;BR /&gt;Did you check more about the command that&lt;BR /&gt;you use in java to get a time, some special&lt;BR /&gt;dependences of.&lt;BR /&gt;&lt;BR /&gt;Caesar</description>
      <pubDate>Fri, 27 Jun 2003 19:36:24 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/java-displays-wrong-system-time/m-p/3009256#M911418</guid>
      <dc:creator>Caesar_3</dc:creator>
      <dc:date>2003-06-27T19:36:24Z</dc:date>
    </item>
    <item>
      <title>Re: Java displays wrong system time.</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/java-displays-wrong-system-time/m-p/3009257#M911419</link>
      <description>This is the code the developer is using to display date.&lt;BR /&gt;&lt;BR /&gt;import java.util.*;&lt;BR /&gt;import java.text.*;&lt;BR /&gt;&lt;BR /&gt;public class Exp&lt;BR /&gt;{&lt;BR /&gt;        public static void main(String [] args)&lt;BR /&gt;        {&lt;BR /&gt;                SimpleDateFormat df = new SimpleDateFormat ("yyyy-MM-dd HH:mm:ss&lt;BR /&gt;.SSS");&lt;BR /&gt;                for (int i=0; i &amp;lt; 10; ++i)&lt;BR /&gt;                {&lt;BR /&gt;                        Date now = new Date();&lt;BR /&gt;                        System.out.println (df.format(now));&lt;BR /&gt;                        long lTime = System.currentTimeMillis();&lt;BR /&gt;                        System.out.println (lTime);&lt;BR /&gt;                        try&lt;BR /&gt;                        {&lt;BR /&gt;                                Thread.sleep (256);&lt;BR /&gt;                        }&lt;BR /&gt;                        catch (InterruptedException e) {}&lt;BR /&gt;                }&lt;BR /&gt;        }&lt;BR /&gt;}&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;-Venkat</description>
      <pubDate>Fri, 27 Jun 2003 20:26:07 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/java-displays-wrong-system-time/m-p/3009257#M911419</guid>
      <dc:creator>venkatesh_5</dc:creator>
      <dc:date>2003-06-27T20:26:07Z</dc:date>
    </item>
    <item>
      <title>Re: Java displays wrong system time.</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/java-displays-wrong-system-time/m-p/3009258#M911420</link>
      <description>Any other options ???</description>
      <pubDate>Mon, 30 Jun 2003 12:49:56 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/java-displays-wrong-system-time/m-p/3009258#M911420</guid>
      <dc:creator>venkatesh_5</dc:creator>
      <dc:date>2003-06-30T12:49:56Z</dc:date>
    </item>
    <item>
      <title>Re: Java displays wrong system time.</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/java-displays-wrong-system-time/m-p/3009259#M911421</link>
      <description>Hello!&lt;BR /&gt;&lt;BR /&gt;I cann't see something wrong in the source&lt;BR /&gt;so for now i had no ideas.&lt;BR /&gt;&lt;BR /&gt;Caesar</description>
      <pubDate>Mon, 30 Jun 2003 20:16:02 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/java-displays-wrong-system-time/m-p/3009259#M911421</guid>
      <dc:creator>Caesar_3</dc:creator>
      <dc:date>2003-06-30T20:16:02Z</dc:date>
    </item>
  </channel>
</rss>

