<?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: mktime in a C program in Operating System - OpenVMS</title>
    <link>https://community.hpe.com/t5/operating-system-openvms/mktime-in-a-c-program/m-p/3402747#M31479</link>
    <description>Hi Gerard,&lt;BR /&gt;&lt;BR /&gt;Can you test this program on your computer?&lt;BR /&gt;Also use the ctime function to get the local time.&lt;BR /&gt;Regards,&lt;BR /&gt;Philippe&lt;BR /&gt;</description>
    <pubDate>Tue, 19 Oct 2004 06:44:18 GMT</pubDate>
    <dc:creator>Vouters</dc:creator>
    <dc:date>2004-10-19T06:44:18Z</dc:date>
    <item>
      <title>mktime in a C program</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/mktime-in-a-c-program/m-p/3402743#M31475</link>
      <description>Alpha Vms 7.3-1 unpatched (no ACRTL or TDF patch or any, this is a test machine)&lt;BR /&gt;&lt;BR /&gt;A program using mktime gives a one hour drift from the system time (minus one hour).&lt;BR /&gt;When I ask for a time after the next time change (last Sunday of October), it is plus one hour.&lt;BR /&gt;Anyway, always incorrect.&lt;BR /&gt;&lt;BR /&gt; I seem to recall that tzset had a relationship with that.  At &lt;BR /&gt;&lt;A href="http://h71000.www7.hp.com/commercial/c/docs/5763p053.html" target="_blank"&gt;http://h71000.www7.hp.com/commercial/c/docs/5763p053.html&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;but if somebody has an example of using tzset, it would help.</description>
      <pubDate>Mon, 18 Oct 2004 15:35:43 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/mktime-in-a-c-program/m-p/3402743#M31475</guid>
      <dc:creator>labadie_1</dc:creator>
      <dc:date>2004-10-18T15:35:43Z</dc:date>
    </item>
    <item>
      <title>Re: mktime in a C program</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/mktime-in-a-c-program/m-p/3402744#M31476</link>
      <description>Gerard,&lt;BR /&gt;&lt;BR /&gt;  There have been several fixes to timezones, so it would be best to get your system up to rev first.&lt;BR /&gt;&lt;BR /&gt;  Check what your timezones set to, then check the definitions. If the definitions are wrong, have a look at the timezone update procedures at:&lt;BR /&gt;&lt;BR /&gt;  &lt;A href="http://ftp.hp.com.au" target="_blank"&gt;http://ftp.hp.com.au&lt;/A&gt; &lt;BR /&gt;&lt;BR /&gt;  Although these are for Australian &amp;amp; New Zealand timezones, I'm sure you can use them as templates to fix yours.&lt;BR /&gt;&lt;BR /&gt;  (and if you're running DECnet+, don't forget to fix those zone definitions too!)&lt;BR /&gt;</description>
      <pubDate>Mon, 18 Oct 2004 16:42:51 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/mktime-in-a-c-program/m-p/3402744#M31476</guid>
      <dc:creator>John Gillings</dc:creator>
      <dc:date>2004-10-18T16:42:51Z</dc:date>
    </item>
    <item>
      <title>Re: mktime in a C program</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/mktime-in-a-c-program/m-p/3402745#M31477</link>
      <description>&amp;gt;&amp;gt;&amp;gt; A program using mktime gives a one hour drift from the system time (minus one hour).&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Or.. it is returning UTC.&lt;BR /&gt;In Greenwich it one hour earlier then local for you no?&lt;BR /&gt;&lt;BR /&gt;fwiw,&lt;BR /&gt;Hein.&lt;BR /&gt;</description>
      <pubDate>Mon, 18 Oct 2004 17:12:35 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/mktime-in-a-c-program/m-p/3402745#M31477</guid>
      <dc:creator>Hein van den Heuvel</dc:creator>
      <dc:date>2004-10-18T17:12:35Z</dc:date>
    </item>
    <item>
      <title>Re: mktime in a C program</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/mktime-in-a-c-program/m-p/3402746#M31478</link>
      <description>I think the setup is correct (for France) on the node&lt;BR /&gt;&lt;BR /&gt;$ sh log *zone*&lt;BR /&gt;&lt;BR /&gt;(LNM$PROCESS_TABLE)&lt;BR /&gt;&lt;BR /&gt;(LNM$JOB_818E2080)&lt;BR /&gt;&lt;BR /&gt;(LNM$GROUP_000001)&lt;BR /&gt;&lt;BR /&gt;(LNM$SYSTEM_TABLE)&lt;BR /&gt;&lt;BR /&gt;  "SYS$TIMEZONE_DAYLIGHT_SAVING" = "1"&lt;BR /&gt;  "SYS$TIMEZONE_DIFFERENTIAL" = "7200"&lt;BR /&gt;  "SYS$TIMEZONE_NAME" = "MET DST"&lt;BR /&gt;  "SYS$TIMEZONE_RULE" = "MET-1MET DST-2,M3.4.0/02,M10.5.0/03"&lt;BR /&gt;&lt;BR /&gt;(LNM$SYSCLUSTER_TABLE)&lt;BR /&gt;&lt;BR /&gt;(DECW$LOGICAL_NAMES)&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;I have found in comp.os.vms a post by David Jones which says&lt;BR /&gt;&lt;BR /&gt;You've got it backwards, decc$fix_time is NOT adding the differential while&lt;BR /&gt;time() is subtracting it (in order to give the illusion that the system clock&lt;BR /&gt;is UTC).  The ctime() expects its argument to be UTC and then adjusts the&lt;BR /&gt;displayed time returned by whatever the current timezone setting (TZSET) is.&lt;BR /&gt;The documentation should be clearer that decc$fix_time() does not do any&lt;BR /&gt;timezone adjustments, but I think it's use is discouraged anyway.&lt;BR /&gt;&lt;BR /&gt;The crux of the problem is that VMS's system clock uses local time rather than&lt;BR /&gt;UTC.  The timestamps in the file system are local time also, which causes&lt;BR /&gt;similar grief with the times returned in stat structures.&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;David L. Jones</description>
      <pubDate>Mon, 18 Oct 2004 23:44:48 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/mktime-in-a-c-program/m-p/3402746#M31478</guid>
      <dc:creator>labadie_1</dc:creator>
      <dc:date>2004-10-18T23:44:48Z</dc:date>
    </item>
    <item>
      <title>Re: mktime in a C program</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/mktime-in-a-c-program/m-p/3402747#M31479</link>
      <description>Hi Gerard,&lt;BR /&gt;&lt;BR /&gt;Can you test this program on your computer?&lt;BR /&gt;Also use the ctime function to get the local time.&lt;BR /&gt;Regards,&lt;BR /&gt;Philippe&lt;BR /&gt;</description>
      <pubDate>Tue, 19 Oct 2004 06:44:18 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/mktime-in-a-c-program/m-p/3402747#M31479</guid>
      <dc:creator>Vouters</dc:creator>
      <dc:date>2004-10-19T06:44:18Z</dc:date>
    </item>
    <item>
      <title>Re: mktime in a C program</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/mktime-in-a-c-program/m-p/3402748#M31480</link>
      <description>Thanks a lot Philippe, this is exactly what I was looking for.</description>
      <pubDate>Tue, 19 Oct 2004 07:04:18 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/mktime-in-a-c-program/m-p/3402748#M31480</guid>
      <dc:creator>labadie_1</dc:creator>
      <dc:date>2004-10-19T07:04:18Z</dc:date>
    </item>
  </channel>
</rss>

