<?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: Converting timestamp to date/time in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/converting-timestamp-to-date-time/m-p/2626078#M916795</link>
    <description>Hi Joel:&lt;BR /&gt;&lt;BR /&gt;You can do this:&lt;BR /&gt;&lt;BR /&gt;# echo "0d1000000000=Y"|adb&lt;BR /&gt;&lt;BR /&gt;replacing the 1000000000 with your timestamp value.&lt;BR /&gt;&lt;BR /&gt;Regards!&lt;BR /&gt;&lt;BR /&gt;...JRF... &lt;BR /&gt;&lt;BR /&gt;</description>
    <pubDate>Wed, 05 Dec 2001 16:41:55 GMT</pubDate>
    <dc:creator>James R. Ferguson</dc:creator>
    <dc:date>2001-12-05T16:41:55Z</dc:date>
    <item>
      <title>Converting timestamp to date/time</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/converting-timestamp-to-date-time/m-p/2626077#M916794</link>
      <description>Can anyone tell me the equation that will convert seconds (since epoch) to month/day/year hour:min:sec format?&lt;BR /&gt;&lt;BR /&gt;Also, is there a function that will do this?  If so, how is it used?&lt;BR /&gt;&lt;BR /&gt;Any help will be greatly appreciated!&lt;BR /&gt;&lt;BR /&gt;Thanks,&lt;BR /&gt;jls</description>
      <pubDate>Wed, 05 Dec 2001 16:37:35 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/converting-timestamp-to-date-time/m-p/2626077#M916794</guid>
      <dc:creator>Joel Shank</dc:creator>
      <dc:date>2001-12-05T16:37:35Z</dc:date>
    </item>
    <item>
      <title>Re: Converting timestamp to date/time</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/converting-timestamp-to-date-time/m-p/2626078#M916795</link>
      <description>Hi Joel:&lt;BR /&gt;&lt;BR /&gt;You can do this:&lt;BR /&gt;&lt;BR /&gt;# echo "0d1000000000=Y"|adb&lt;BR /&gt;&lt;BR /&gt;replacing the 1000000000 with your timestamp value.&lt;BR /&gt;&lt;BR /&gt;Regards!&lt;BR /&gt;&lt;BR /&gt;...JRF... &lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Wed, 05 Dec 2001 16:41:55 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/converting-timestamp-to-date-time/m-p/2626078#M916795</guid>
      <dc:creator>James R. Ferguson</dc:creator>
      <dc:date>2001-12-05T16:41:55Z</dc:date>
    </item>
    <item>
      <title>Re: Converting timestamp to date/time</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/converting-timestamp-to-date-time/m-p/2626079#M916796</link>
      <description>I have this saved-up some time ago. Hope it helps ..&lt;BR /&gt;----------------------------------------&lt;BR /&gt;&lt;BR /&gt;Here is the information on how to convert from EPOCH time (time in seconds since 1/1/1970) to our HUMAN time.&lt;BR /&gt;&lt;BR /&gt;There is also an SQL select statement example showing how to convert from EPOCh to HUMAN time included below.&lt;BR /&gt;&lt;BR /&gt;In addition, there is code included that shows how to print the current EPOCH time.&lt;BR /&gt;&lt;BR /&gt;     1. Conversion from EPOCH to HUMAN time:&lt;BR /&gt;&lt;BR /&gt;        The following is the source code in 'C':&lt;BR /&gt;&lt;BR /&gt;        #include &lt;TIME.H&gt;&lt;BR /&gt;        main(argc, argv)&lt;BR /&gt;&lt;BR /&gt;        int argc;&lt;BR /&gt;        char **argv;&lt;BR /&gt;        {&lt;BR /&gt;         time_t foo;&lt;BR /&gt;         foo = atoi(argv[1]);&lt;BR /&gt;         printf("%s",ctime(&amp;amp;foo));&lt;BR /&gt;        }&lt;BR /&gt;&lt;BR /&gt;     1a.  Create a vi file (with extension .c) that includes the above lines.&lt;BR /&gt;&lt;BR /&gt;          For example:  vi time.c&lt;BR /&gt;&lt;BR /&gt;          From the command line type the following:&lt;BR /&gt;          cc (filename)&lt;BR /&gt;&lt;BR /&gt;          For example:  cc time.c&lt;BR /&gt;&lt;BR /&gt;          This should create an a.out file in same directory.&lt;BR /&gt;&lt;BR /&gt;     1b.  Simply run the command:&lt;BR /&gt;&lt;BR /&gt;          For example:&lt;BR /&gt;&lt;BR /&gt;          ./a.out 913097859      &amp;lt;&amp;lt;&amp;lt;---digits you want converted&lt;BR /&gt;&lt;BR /&gt;          Your output will look like:&lt;BR /&gt;&lt;BR /&gt;          Tue Dec  8 00:17:39 1998&lt;BR /&gt;&lt;BR /&gt;      2. The SQL 'select' statement can be used to convert ITO Oracle EPOCH fields to human time:&lt;BR /&gt;&lt;BR /&gt;         select&lt;BR /&gt;&lt;BR /&gt;         TO_DATE(TRUNC(creation_time/ 86400) + 2440588, 'J'),&lt;BR /&gt;         TO_CHAR(TO_DATE(MOD(creation_time, 86400), 'SSSSS'),'HH24:MI:SS')&lt;BR /&gt;         from opc_op.opc_act_messages&lt;BR /&gt;         where node_id = '&lt;NODE-ID&gt;';&lt;BR /&gt;&lt;BR /&gt;      3. Here is source code in 'C' to print current time in EPOCH time:&lt;BR /&gt;&lt;BR /&gt;         #include &lt;TIME.H&gt;&lt;BR /&gt;&lt;BR /&gt;         main()&lt;BR /&gt;         {&lt;BR /&gt;         printf("%ld\n",time(NULL));&lt;BR /&gt;         }&lt;BR /&gt;&lt;BR /&gt;     3a.  Create a vi file (with extension .c) that include the above lines.&lt;BR /&gt;&lt;BR /&gt;          For example:  vi time.c&lt;BR /&gt;&lt;BR /&gt;          From the command line type the following:&lt;BR /&gt;          cc (filename)&lt;BR /&gt;&lt;BR /&gt;          For example:  cc time.c&lt;BR /&gt;&lt;BR /&gt;          This should create an a.out file in same directory.&lt;BR /&gt;&lt;BR /&gt;     3b.  Simply run the command:&lt;BR /&gt;&lt;BR /&gt;          For example:&lt;BR /&gt;&lt;BR /&gt;          ./a.out&lt;BR /&gt;&lt;BR /&gt;Remember EPOCH fields will expire (reach their limit at) year 2037&lt;BR /&gt;&lt;BR /&gt;&lt;/TIME.H&gt;&lt;/NODE-ID&gt;&lt;/TIME.H&gt;</description>
      <pubDate>Wed, 05 Dec 2001 16:42:26 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/converting-timestamp-to-date-time/m-p/2626079#M916796</guid>
      <dc:creator>S.K. Chan</dc:creator>
      <dc:date>2001-12-05T16:42:26Z</dc:date>
    </item>
    <item>
      <title>Re: Converting timestamp to date/time</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/converting-timestamp-to-date-time/m-p/2626080#M916797</link>
      <description>Try this little C program:&lt;BR /&gt;&lt;BR /&gt;#include &lt;STDLIB.H&gt;&lt;BR /&gt;int main(argc, argv)&lt;BR /&gt;int argc;&lt;BR /&gt;char **argv;&lt;BR /&gt;{&lt;BR /&gt;  time_t t=strtoul(argv[1], NULL, 0);&lt;BR /&gt;  printf("%s", ctime(&amp;amp;t));&lt;BR /&gt;}&lt;BR /&gt;/* end */&lt;BR /&gt;&lt;BR /&gt;$ cc -o ctime ctime.c&lt;BR /&gt;$ ./ctime 1007570579&lt;BR /&gt;Wed Dec  5 16:42:59 2001&lt;BR /&gt;&lt;BR /&gt;Regards,&lt;BR /&gt;Steve&lt;/STDLIB.H&gt;</description>
      <pubDate>Wed, 05 Dec 2001 16:42:46 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/converting-timestamp-to-date-time/m-p/2626080#M916797</guid>
      <dc:creator>Steven Gillard_2</dc:creator>
      <dc:date>2001-12-05T16:42:46Z</dc:date>
    </item>
    <item>
      <title>Re: Converting timestamp to date/time</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/converting-timestamp-to-date-time/m-p/2626081#M916798</link>
      <description>Hi Joel,&lt;BR /&gt;&lt;BR /&gt;Try this,&lt;BR /&gt;&lt;BR /&gt;&lt;A href="http://www.faqs.org/faqs/hp/hpux-faq/section-160.html" target="_blank"&gt;http://www.faqs.org/faqs/hp/hpux-faq/section-160.html&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;Hope this helps.&lt;BR /&gt;&lt;BR /&gt;Regds&lt;BR /&gt;</description>
      <pubDate>Wed, 05 Dec 2001 17:03:00 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/converting-timestamp-to-date-time/m-p/2626081#M916798</guid>
      <dc:creator>Sanjay_6</dc:creator>
      <dc:date>2001-12-05T17:03:00Z</dc:date>
    </item>
    <item>
      <title>Re: Converting timestamp to date/time</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/converting-timestamp-to-date-time/m-p/2626082#M916799</link>
      <description>This is exactly what I needed.&lt;BR /&gt;&lt;BR /&gt;THANKS TO ALL!&lt;BR /&gt;&lt;BR /&gt;jls</description>
      <pubDate>Wed, 05 Dec 2001 17:13:22 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/converting-timestamp-to-date-time/m-p/2626082#M916799</guid>
      <dc:creator>Joel Shank</dc:creator>
      <dc:date>2001-12-05T17:13:22Z</dc:date>
    </item>
    <item>
      <title>Re: Converting timestamp to date/time</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/converting-timestamp-to-date-time/m-p/2626083#M916800</link>
      <description>I use the method James mentioned a lot. Especially in converting the information found in the /tcb account files into useful information about when users have last logged in and stuff like that.&lt;BR /&gt;&lt;BR /&gt;C</description>
      <pubDate>Wed, 05 Dec 2001 17:55:23 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/converting-timestamp-to-date-time/m-p/2626083#M916800</guid>
      <dc:creator>Craig Rants</dc:creator>
      <dc:date>2001-12-05T17:55:23Z</dc:date>
    </item>
    <item>
      <title>Re: Converting timestamp to date/time</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/converting-timestamp-to-date-time/m-p/2626084#M916801</link>
      <description>THis is a cute little program, btw, does anyone think M$ will have replaced their 32bit os by then ( I personally doubt it )?&lt;BR /&gt;&lt;BR /&gt;#include &lt;STDIO.H&gt;&lt;BR /&gt;#include &lt;LIMITS.H&gt;&lt;BR /&gt;#include &lt;TIME.H&gt;&lt;BR /&gt;&lt;BR /&gt;    main()&lt;BR /&gt;    {&lt;BR /&gt;        time_t maxt = LONG_MAX; /* 2147483647L */&lt;BR /&gt;        printf("The end of time as we know it is %s GMT\n",&lt;BR /&gt;                                    asctime(gmtime(&amp;amp;maxt)));&lt;BR /&gt;        maxt = maxt + 1;&lt;BR /&gt;&lt;BR /&gt;        printf("One second after will be (in 32bits) %s GMT\n",&lt;BR /&gt;                                    asctime(gmtime(&amp;amp;maxt)));&lt;BR /&gt;    }&lt;BR /&gt;&lt;BR /&gt;$ ./timemach&lt;BR /&gt;The end of time as we know it is Tue Jan 19 03:14:07 2038&lt;BR /&gt; GMT&lt;BR /&gt;One second after will be (in 32bits) Fri Dec 13 20:45:52 1901&lt;BR /&gt; GMT&lt;BR /&gt;$ &lt;BR /&gt;&lt;BR /&gt;live free or die&lt;BR /&gt;harry&lt;BR /&gt;&lt;/TIME.H&gt;&lt;/LIMITS.H&gt;&lt;/STDIO.H&gt;</description>
      <pubDate>Thu, 28 Feb 2002 16:08:28 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/converting-timestamp-to-date-time/m-p/2626084#M916801</guid>
      <dc:creator>harry d brown jr</dc:creator>
      <dc:date>2002-02-28T16:08:28Z</dc:date>
    </item>
  </channel>
</rss>

