<?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: Timestamp in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/timestamp/m-p/2578930#M920465</link>
    <description>I am not sure if there is a command to get what you want. Compile this small c program and see if this is what you are looking for.&lt;BR /&gt;&lt;BR /&gt;#include &lt;STDIO.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 t;&lt;BR /&gt;&lt;BR /&gt; time(&amp;amp;t);&lt;BR /&gt;&lt;BR /&gt; printf("%d", t);&lt;BR /&gt;}&lt;BR /&gt;&lt;BR /&gt;-Sri&lt;/TIME.H&gt;&lt;/STDIO.H&gt;</description>
    <pubDate>Thu, 13 Sep 2001 10:11:41 GMT</pubDate>
    <dc:creator>Sridhar Bhaskarla</dc:creator>
    <dc:date>2001-09-13T10:11:41Z</dc:date>
    <item>
      <title>Timestamp</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/timestamp/m-p/2578929#M920464</link>
      <description>How can I generate a timestamp from date/time?&lt;BR /&gt;&lt;BR /&gt;For example&lt;BR /&gt;timestamp 9800370710&lt;BR /&gt;generated from 2000-Dec-18 14:20:34&lt;BR /&gt;&lt;BR /&gt;I want to get a timestamp for current date/time in order for comparasion of job execution time.</description>
      <pubDate>Thu, 13 Sep 2001 09:55:05 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/timestamp/m-p/2578929#M920464</guid>
      <dc:creator>Ryan Ma</dc:creator>
      <dc:date>2001-09-13T09:55:05Z</dc:date>
    </item>
    <item>
      <title>Re: Timestamp</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/timestamp/m-p/2578930#M920465</link>
      <description>I am not sure if there is a command to get what you want. Compile this small c program and see if this is what you are looking for.&lt;BR /&gt;&lt;BR /&gt;#include &lt;STDIO.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 t;&lt;BR /&gt;&lt;BR /&gt; time(&amp;amp;t);&lt;BR /&gt;&lt;BR /&gt; printf("%d", t);&lt;BR /&gt;}&lt;BR /&gt;&lt;BR /&gt;-Sri&lt;/TIME.H&gt;&lt;/STDIO.H&gt;</description>
      <pubDate>Thu, 13 Sep 2001 10:11:41 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/timestamp/m-p/2578930#M920465</guid>
      <dc:creator>Sridhar Bhaskarla</dc:creator>
      <dc:date>2001-09-13T10:11:41Z</dc:date>
    </item>
    <item>
      <title>Re: Timestamp</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/timestamp/m-p/2578931#M920466</link>
      <description>Hi Ryan,&lt;BR /&gt;&lt;BR /&gt;To get the current timestamp:&lt;BR /&gt;&lt;BR /&gt;perl -e 'print time,"\n"'&lt;BR /&gt;&lt;BR /&gt;Rgds, Robin.</description>
      <pubDate>Thu, 13 Sep 2001 11:14:34 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/timestamp/m-p/2578931#M920466</guid>
      <dc:creator>Robin Wakefield</dc:creator>
      <dc:date>2001-09-13T11:14:34Z</dc:date>
    </item>
    <item>
      <title>Re: Timestamp</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/timestamp/m-p/2578932#M920467</link>
      <description>For job execution time there is a wonderful command "timex" which shows you the time consumption of a process'es lifetime.&lt;BR /&gt;&lt;BR /&gt;If you needed improved accuracy (clock ticks vs. seconds) use the gettimeofday function replacing the time function in the C-program.&lt;BR /&gt;&lt;BR /&gt;Klaus</description>
      <pubDate>Thu, 13 Sep 2001 12:45:04 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/timestamp/m-p/2578932#M920467</guid>
      <dc:creator>Klaus Crusius</dc:creator>
      <dc:date>2001-09-13T12:45:04Z</dc:date>
    </item>
    <item>
      <title>Re: Timestamp</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/timestamp/m-p/2578933#M920468</link>
      <description>Klaus,&lt;BR /&gt;&lt;BR /&gt;Sorry, I am afraid I have misleaded you.&lt;BR /&gt;&lt;BR /&gt;I want to compare different finish time of jobs so "timex" command cannot be used.&lt;BR /&gt;</description>
      <pubDate>Fri, 14 Sep 2001 00:32:58 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/timestamp/m-p/2578933#M920468</guid>
      <dc:creator>Ryan Ma</dc:creator>
      <dc:date>2001-09-14T00:32:58Z</dc:date>
    </item>
    <item>
      <title>Re: Timestamp</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/timestamp/m-p/2578934#M920469</link>
      <description>Three options:&lt;BR /&gt;&lt;BR /&gt;- Use gnu date with the %s formatting option&lt;BR /&gt;date +%s&lt;BR /&gt;&lt;BR /&gt;- Use perl like Robin suggested&lt;BR /&gt;perl -e 'print time();'&lt;BR /&gt;&lt;BR /&gt;- Use a simple program such as Sridhar presented.&lt;BR /&gt;</description>
      <pubDate>Fri, 14 Sep 2001 00:47:46 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/timestamp/m-p/2578934#M920469</guid>
      <dc:creator>Bill Thorsteinson</dc:creator>
      <dc:date>2001-09-14T00:47:46Z</dc:date>
    </item>
    <item>
      <title>Re: Timestamp</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/timestamp/m-p/2578935#M920470</link>
      <description>Bill,&lt;BR /&gt;&lt;BR /&gt;The first option doesn't work.&lt;BR /&gt;# date +%s&lt;BR /&gt;date: bad format character - s&lt;BR /&gt;# date +"%s"&lt;BR /&gt;date: bad format character - s&lt;BR /&gt;&lt;BR /&gt;It works using perl or writing a C program so I will not try Sridhar.</description>
      <pubDate>Fri, 14 Sep 2001 01:08:00 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/timestamp/m-p/2578935#M920470</guid>
      <dc:creator>Ryan Ma</dc:creator>
      <dc:date>2001-09-14T01:08:00Z</dc:date>
    </item>
    <item>
      <title>Re: Timestamp</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/timestamp/m-p/2578936#M920471</link>
      <description>Hi .. Maybe Im a little late .. &lt;BR /&gt;we use. &lt;BR /&gt;#date +%m%d%H%M&lt;BR /&gt;Gives you&lt;BR /&gt;09132138&lt;BR /&gt;From Thu Sep 13 21:38:13 CDT 2001&lt;BR /&gt;&lt;BR /&gt;In a job redirect your output to file.txt&lt;BR /&gt;With this at the end&lt;BR /&gt;stamp=`date +%m%d%H%M`&lt;BR /&gt;cp file.txt file.txt.$stamp &lt;BR /&gt;and it will look like this&lt;BR /&gt;file.txt.09132138&lt;BR /&gt;&lt;BR /&gt;Richard&lt;BR /&gt;</description>
      <pubDate>Fri, 14 Sep 2001 01:35:00 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/timestamp/m-p/2578936#M920471</guid>
      <dc:creator>someone_4</dc:creator>
      <dc:date>2001-09-14T01:35:00Z</dc:date>
    </item>
    <item>
      <title>Re: Timestamp</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/timestamp/m-p/2578937#M920472</link>
      <description>OHH if you want seconds at the end &lt;BR /&gt;#date +%m%d%H%M%S&lt;BR /&gt;Gives you&lt;BR /&gt;0913214619&lt;BR /&gt;from .. &lt;BR /&gt;Thu Sep 13 21:46:19 CDT 2001&lt;BR /&gt;&lt;BR /&gt;Richard&lt;BR /&gt;</description>
      <pubDate>Fri, 14 Sep 2001 01:40:59 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/timestamp/m-p/2578937#M920472</guid>
      <dc:creator>someone_4</dc:creator>
      <dc:date>2001-09-14T01:40:59Z</dc:date>
    </item>
    <item>
      <title>Re: Timestamp</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/timestamp/m-p/2578938#M920473</link>
      <description>Richard,&lt;BR /&gt;&lt;BR /&gt;I have thunk of your idea but I find that it does not suit my need.&lt;BR /&gt;&lt;BR /&gt;The reason is that I can't find the difference of time between two timestamp made from date +%m%d%H%M%S.&lt;BR /&gt;&lt;BR /&gt;If using other method to obtain the timestamp, I can get the difference of seconds.&lt;BR /&gt;</description>
      <pubDate>Fri, 14 Sep 2001 03:05:59 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/timestamp/m-p/2578938#M920473</guid>
      <dc:creator>Ryan Ma</dc:creator>
      <dc:date>2001-09-14T03:05:59Z</dc:date>
    </item>
  </channel>
</rss>

