<?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: OPEN VMS C in Operating System - OpenVMS</title>
    <link>https://community.hpe.com/t5/operating-system-openvms/open-vms-c/m-p/4092311#M38671</link>
    <description>You can either use ANSI C functions. like&lt;BR /&gt;&lt;BR /&gt;time_t t = time((time_t)9); printf(asctime(localtime(&amp;amp;t)));&lt;BR /&gt;&lt;BR /&gt;Or you set up a $DESCRIPTOR and call SYS$ASCTIM().&lt;BR /&gt;&lt;BR /&gt;cu,&lt;BR /&gt;  Martin</description>
    <pubDate>Thu, 25 Oct 2007 11:33:49 GMT</pubDate>
    <dc:creator>Martin Vorlaender</dc:creator>
    <dc:date>2007-10-25T11:33:49Z</dc:date>
    <item>
      <title>OPEN VMS C</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/open-vms-c/m-p/4092310#M38670</link>
      <description>How to printf system time time in OPEN VMS C</description>
      <pubDate>Thu, 25 Oct 2007 11:15:39 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/open-vms-c/m-p/4092310#M38670</guid>
      <dc:creator>Rizwan Latheef</dc:creator>
      <dc:date>2007-10-25T11:15:39Z</dc:date>
    </item>
    <item>
      <title>Re: OPEN VMS C</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/open-vms-c/m-p/4092311#M38671</link>
      <description>You can either use ANSI C functions. like&lt;BR /&gt;&lt;BR /&gt;time_t t = time((time_t)9); printf(asctime(localtime(&amp;amp;t)));&lt;BR /&gt;&lt;BR /&gt;Or you set up a $DESCRIPTOR and call SYS$ASCTIM().&lt;BR /&gt;&lt;BR /&gt;cu,&lt;BR /&gt;  Martin</description>
      <pubDate>Thu, 25 Oct 2007 11:33:49 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/open-vms-c/m-p/4092311#M38671</guid>
      <dc:creator>Martin Vorlaender</dc:creator>
      <dc:date>2007-10-25T11:33:49Z</dc:date>
    </item>
    <item>
      <title>Re: OPEN VMS C</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/open-vms-c/m-p/4092312#M38672</link>
      <description>There is an exmple of calling lib$sys_asctim here:&lt;BR /&gt;&lt;BR /&gt;&lt;A href="http://www.eight-cubed.com/examples/framework.php?file=lib_sys_asctim.c" target="_blank"&gt;http://www.eight-cubed.com/examples/framework.php?file=lib_sys_asctim.c&lt;/A&gt;</description>
      <pubDate>Thu, 25 Oct 2007 12:25:42 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/open-vms-c/m-p/4092312#M38672</guid>
      <dc:creator>Craig A Berry</dc:creator>
      <dc:date>2007-10-25T12:25:42Z</dc:date>
    </item>
    <item>
      <title>Re: OPEN VMS C</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/open-vms-c/m-p/4092313#M38673</link>
      <description>...and an example for SYS$ASCTIM here:&lt;BR /&gt;&lt;BR /&gt;&lt;A href="http://www.eight-cubed.com/examples/framework.php?file=sys_asctim.c" target="_blank"&gt;http://www.eight-cubed.com/examples/framework.php?file=sys_asctim.c&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;As much as I prefer LIB$ routines when it comes to not using itemlists for just one item to retrieve, in this case and IMHO, $ASCTIM is easier to use.</description>
      <pubDate>Thu, 25 Oct 2007 13:44:45 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/open-vms-c/m-p/4092313#M38673</guid>
      <dc:creator>Martin Vorlaender</dc:creator>
      <dc:date>2007-10-25T13:44:45Z</dc:date>
    </item>
    <item>
      <title>Re: OPEN VMS C</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/open-vms-c/m-p/4092314#M38674</link>
      <description>here's another alternative. the order of year and day is the correct one ihmo.&lt;BR /&gt;char *timestamp(char *timestamp)&lt;BR /&gt;{&lt;BR /&gt;  int   n;&lt;BR /&gt;  int   csec; //centisecs&lt;BR /&gt;  struct timeval tv;&lt;BR /&gt;  struct tm  *ptm;&lt;BR /&gt;&lt;BR /&gt;  gettimeofday(&amp;amp;tv,NULL);&lt;BR /&gt;  ptm=localtime(&amp;amp;tv.tv_sec);&lt;BR /&gt;  n=strftime(timestamp,20,"%Y-%m-%d %H:%M:%S",ptm);&lt;BR /&gt;  csec=tv.tv_usec/10000;&lt;BR /&gt;  sprintf(timestamp+n,".%2.2d",csec);&lt;BR /&gt;  return timestamp;&lt;BR /&gt;}&lt;BR /&gt;&lt;BR /&gt;here's a hack. with the year and day in the other order.&lt;BR /&gt;  int szTime[8] = {23,(int)(szTime+2),0};&lt;BR /&gt;  lib$date_time(szTime);&lt;BR /&gt;  printf("%s\n",(char*)(szTime+2));&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Thu, 25 Oct 2007 19:25:36 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/open-vms-c/m-p/4092314#M38674</guid>
      <dc:creator>Claus Olesen</dc:creator>
      <dc:date>2007-10-25T19:25:36Z</dc:date>
    </item>
    <item>
      <title>Re: OPEN VMS C</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/open-vms-c/m-p/4092315#M38675</link>
      <description>&amp;gt;&amp;gt;&amp;gt; How to printf system time time in OPEN VMS C? &amp;lt;&amp;lt;&amp;lt;&lt;BR /&gt;&lt;BR /&gt;Um, the same way you issue a printf for the system time in every other C implementation?  This from K&amp;amp;R C forward through to the ANSI C and POSIX C calls and C99.&lt;BR /&gt;&lt;BR /&gt;Others have addressed the direct C coding question.&lt;BR /&gt;&lt;BR /&gt;I'm going to guess that you're wondering about the C/Unix epoch -- which is the same on OpenVMS as implemented on most (all?) other C platforms -- and the use of the native quadword time format, and UTC timekeeping.  &lt;BR /&gt;&lt;BR /&gt;I'd tend to use either the C/Unix epoch or the UTC calls if you're working in new code.  Which depends on your particular goals and needs.&lt;BR /&gt;&lt;BR /&gt;There are details on time and timekeeping in the OpenVMS FAQ (&lt;A href="http://www.hoffmanlabs.com)" target="_blank"&gt;www.hoffmanlabs.com)&lt;/A&gt; and in the C RTL manual (&lt;A href="http://www.hp.com/go/openvms/doc)" target="_blank"&gt;www.hp.com/go/openvms/doc)&lt;/A&gt; with the newest C RTL manual now located in the main OpenVMS manual set and not in the C manual shelf.&lt;BR /&gt;</description>
      <pubDate>Fri, 26 Oct 2007 18:52:43 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/open-vms-c/m-p/4092315#M38675</guid>
      <dc:creator>Hoff</dc:creator>
      <dc:date>2007-10-26T18:52:43Z</dc:date>
    </item>
  </channel>
</rss>

