<?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: Calling the strftime() Function in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/calling-the-strftime-function/m-p/2489390#M800822</link>
    <description>Try something like this:&lt;BR /&gt;&lt;BR /&gt;#include &lt;TIME.H&gt;&lt;BR /&gt;&lt;BR /&gt;struct tm *t;&lt;BR /&gt;char buf[80];&lt;BR /&gt;&lt;BR /&gt;t = localtime( time(NULL) );&lt;BR /&gt;strftime( buf, 80, "[%d%m%y:%H%M.%S]", t );&lt;BR /&gt;&lt;BR /&gt;This is straight from the time(), localtime(), and strftime() man pages.&lt;BR /&gt;&lt;BR /&gt;I hope this helps.&lt;/TIME.H&gt;</description>
    <pubDate>Fri, 02 Feb 2001 18:51:50 GMT</pubDate>
    <dc:creator>Kenneth Platz</dc:creator>
    <dc:date>2001-02-02T18:51:50Z</dc:date>
    <item>
      <title>Calling the strftime() Function</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/calling-the-strftime-function/m-p/2489389#M800821</link>
      <description>Dear Gurus,&lt;BR /&gt;&lt;BR /&gt;I am currently trying to develop my C skills, but cannot work out how to do the following ....&lt;BR /&gt;&lt;BR /&gt;I want to prefix all entries to a logfile with the current sysdate/time in the format of "[ddmmmyy:HHMM.ss]"  -  it appears that the strftime() function call will allow me to do this, but I have absolutely no idea on how to call it !!!&lt;BR /&gt;&lt;BR /&gt;Can someone please show me the lines of code I would need to use.&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;(Sorry for being a C-learner !!)&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Regards,&lt;BR /&gt;Paul.</description>
      <pubDate>Fri, 02 Feb 2001 18:36:06 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/calling-the-strftime-function/m-p/2489389#M800821</guid>
      <dc:creator>Paul Murray</dc:creator>
      <dc:date>2001-02-02T18:36:06Z</dc:date>
    </item>
    <item>
      <title>Re: Calling the strftime() Function</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/calling-the-strftime-function/m-p/2489390#M800822</link>
      <description>Try something like this:&lt;BR /&gt;&lt;BR /&gt;#include &lt;TIME.H&gt;&lt;BR /&gt;&lt;BR /&gt;struct tm *t;&lt;BR /&gt;char buf[80];&lt;BR /&gt;&lt;BR /&gt;t = localtime( time(NULL) );&lt;BR /&gt;strftime( buf, 80, "[%d%m%y:%H%M.%S]", t );&lt;BR /&gt;&lt;BR /&gt;This is straight from the time(), localtime(), and strftime() man pages.&lt;BR /&gt;&lt;BR /&gt;I hope this helps.&lt;/TIME.H&gt;</description>
      <pubDate>Fri, 02 Feb 2001 18:51:50 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/calling-the-strftime-function/m-p/2489390#M800822</guid>
      <dc:creator>Kenneth Platz</dc:creator>
      <dc:date>2001-02-02T18:51:50Z</dc:date>
    </item>
    <item>
      <title>Re: Calling the strftime() Function</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/calling-the-strftime-function/m-p/2489391#M800823</link>
      <description>Kenneth,&lt;BR /&gt;&lt;BR /&gt;Many, many thanks for the assistance. Unfortunately, I am getting the following error ....&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Error 212: "WriteLog.cpp", line 48 # Argument type 'tm *' does not match expected parameter type 'long *'&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Thanks again,&lt;BR /&gt;Paul.</description>
      <pubDate>Fri, 02 Feb 2001 19:15:13 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/calling-the-strftime-function/m-p/2489391#M800823</guid>
      <dc:creator>Paul Murray</dc:creator>
      <dc:date>2001-02-02T19:15:13Z</dc:date>
    </item>
  </channel>
</rss>

