<?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: Time make_time(const char* str) setting the wrong timezone for Australia-Eastern in Operating System - Linux</title>
    <link>https://community.hpe.com/t5/operating-system-linux/time-make-time-const-char-str-setting-the-wrong-timezone-for/m-p/3988152#M95840</link>
    <description>(I'm having this moved to Languages, since it is unlikely anybody would know what you are asking.)&lt;BR /&gt;&lt;BR /&gt;You are using the obsolete USL Standard Components.  This was only made available for users porting from cfront and they were told to immediately port to the C++ Standard Lib instead.  In the case of Time, you should be using the Standard C ctime(3).&lt;BR /&gt;&lt;BR /&gt;You should NOT be using the Time component since it ONLY supports US timezones DST transitions.  See Place(3).  Note RWZone has similar issues.&lt;BR /&gt;&lt;BR /&gt;Since you in the southern hemisphere, this will not work for you at all.&lt;BR /&gt;&lt;BR /&gt;Some of this info is documented on:&lt;BR /&gt;&lt;A href="http://h21007.www2.hp.com/dspp/files/unprotected/DST2.pdf" target="_blank"&gt;http://h21007.www2.hp.com/dspp/files/unprotected/DST2.pdf&lt;/A&gt;</description>
    <pubDate>Tue, 24 Apr 2007 21:25:50 GMT</pubDate>
    <dc:creator>Dennis Handly</dc:creator>
    <dc:date>2007-04-24T21:25:50Z</dc:date>
    <item>
      <title>Time make_time(const char* str) setting the wrong timezone for Australia-Eastern</title>
      <link>https://community.hpe.com/t5/operating-system-linux/time-make-time-const-char-str-setting-the-wrong-timezone-for/m-p/3988151#M95839</link>
      <description>The server is running HPUX 11.11 with DST patch PHCO_36097.&lt;BR /&gt;&lt;BR /&gt;Timezone on the server is EST-10EDT i.e. Australia-Eastern.&lt;BR /&gt;&lt;BR /&gt;I wrote a simple program as below to &lt;BR /&gt;- get current time using time&lt;BR /&gt;- convert current time to Time object&lt;BR /&gt;- print Time object&lt;BR /&gt;- get a datetime string from screen&lt;BR /&gt;- convert to Time object&lt;BR /&gt;- print Time object&lt;BR /&gt;&lt;BR /&gt;This program runs perfectly in US EST/EDT timezone, but timezone was completedly wrong under EST-10EDT timezone, see output below:&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;pumbaa:date&lt;BR /&gt;Wed Apr 25 07:19:39 EST 2007&lt;BR /&gt;pumbaa:/tmp/DST&lt;BR /&gt;current time is Wed Apr 25 07:19:45 2007&lt;BR /&gt;&lt;BR /&gt;year:2007&lt;BR /&gt;month:04&lt;BR /&gt;day:25&lt;BR /&gt;hour:07&lt;BR /&gt;minute:19&lt;BR /&gt;second:45&lt;BR /&gt;timezone:EDT&lt;BR /&gt;Enter date string as mm/dd/yyyy?12/10/2007&lt;BR /&gt;Enter time string as hh:mm?8:8:8&lt;BR /&gt;String: 12/10/2007 8:8:8become:&lt;BR /&gt;year:2007&lt;BR /&gt;month:12&lt;BR /&gt;day:10&lt;BR /&gt;hour:08&lt;BR /&gt;minute:08&lt;BR /&gt;second:08&lt;BR /&gt;timezone:EST&lt;BR /&gt;Converting this time to time_t=1197238088&lt;BR /&gt;convert to string is Mon Dec 10 09:08:08 2007&lt;BR /&gt;&lt;BR /&gt;What did I missed?&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Tue, 24 Apr 2007 16:21:30 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/time-make-time-const-char-str-setting-the-wrong-timezone-for/m-p/3988151#M95839</guid>
      <dc:creator>Peyhwa Yuen</dc:creator>
      <dc:date>2007-04-24T16:21:30Z</dc:date>
    </item>
    <item>
      <title>Re: Time make_time(const char* str) setting the wrong timezone for Australia-Eastern</title>
      <link>https://community.hpe.com/t5/operating-system-linux/time-make-time-const-char-str-setting-the-wrong-timezone-for/m-p/3988152#M95840</link>
      <description>(I'm having this moved to Languages, since it is unlikely anybody would know what you are asking.)&lt;BR /&gt;&lt;BR /&gt;You are using the obsolete USL Standard Components.  This was only made available for users porting from cfront and they were told to immediately port to the C++ Standard Lib instead.  In the case of Time, you should be using the Standard C ctime(3).&lt;BR /&gt;&lt;BR /&gt;You should NOT be using the Time component since it ONLY supports US timezones DST transitions.  See Place(3).  Note RWZone has similar issues.&lt;BR /&gt;&lt;BR /&gt;Since you in the southern hemisphere, this will not work for you at all.&lt;BR /&gt;&lt;BR /&gt;Some of this info is documented on:&lt;BR /&gt;&lt;A href="http://h21007.www2.hp.com/dspp/files/unprotected/DST2.pdf" target="_blank"&gt;http://h21007.www2.hp.com/dspp/files/unprotected/DST2.pdf&lt;/A&gt;</description>
      <pubDate>Tue, 24 Apr 2007 21:25:50 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/time-make-time-const-char-str-setting-the-wrong-timezone-for/m-p/3988152#M95840</guid>
      <dc:creator>Dennis Handly</dc:creator>
      <dc:date>2007-04-24T21:25:50Z</dc:date>
    </item>
    <item>
      <title>Re: Time make_time(const char* str) setting the wrong timezone for Australia-Eastern</title>
      <link>https://community.hpe.com/t5/operating-system-linux/time-make-time-const-char-str-setting-the-wrong-timezone-for/m-p/3988153#M95841</link>
      <description>Dennis,&lt;BR /&gt;&lt;BR /&gt;This is the first time I heard about the limitation of Time.&lt;BR /&gt;&lt;BR /&gt;I guess I will have to change to use ctime related function instead.&lt;BR /&gt;&lt;BR /&gt;Thanks.&lt;BR /&gt;&lt;BR /&gt;-Peyhwa</description>
      <pubDate>Wed, 25 Apr 2007 15:39:45 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/time-make-time-const-char-str-setting-the-wrong-timezone-for/m-p/3988153#M95841</guid>
      <dc:creator>Peyhwa Yuen</dc:creator>
      <dc:date>2007-04-25T15:39:45Z</dc:date>
    </item>
    <item>
      <title>Re: Time make_time(const char* str) setting the wrong timezone for Australia-Eastern</title>
      <link>https://community.hpe.com/t5/operating-system-linux/time-make-time-const-char-str-setting-the-wrong-timezone-for/m-p/3988154#M95842</link>
      <description>&amp;gt;This is the first time I heard about the limitation of Time.&lt;BR /&gt;&lt;BR /&gt;Well, it has always been there under Place(3).  And if you ever tried it, it should be off by 1 hour, nearly all of the year.&lt;BR /&gt;&lt;BR /&gt;Also, lib++.a is not available on Integrity.</description>
      <pubDate>Wed, 25 Apr 2007 18:20:45 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/time-make-time-const-char-str-setting-the-wrong-timezone-for/m-p/3988154#M95842</guid>
      <dc:creator>Dennis Handly</dc:creator>
      <dc:date>2007-04-25T18:20:45Z</dc:date>
    </item>
  </channel>
</rss>

