<?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: When does DST start? in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/when-does-dst-start/m-p/2925625#M110548</link>
    <description>Just thought I would give you an update. I used the Perl script and it works great although I can't test it. I did change it to simply exit with 1,0, or -1 instead of printing the result.&lt;BR /&gt;If the exit status is 0, the script does nothing but if it is -1 or 1 it sends mail to the users.&lt;BR /&gt;&lt;BR /&gt;Thanks everybody for your help.&lt;BR /&gt;Greg&lt;BR /&gt;</description>
    <pubDate>Wed, 12 Mar 2003 22:07:49 GMT</pubDate>
    <dc:creator>Greg White</dc:creator>
    <dc:date>2003-03-12T22:07:49Z</dc:date>
    <item>
      <title>When does DST start?</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/when-does-dst-start/m-p/2925618#M110541</link>
      <description>Hello experts,&lt;BR /&gt;&lt;BR /&gt;I have been asked to come up with a way to determine if Daylight Saving Time begins during the coming weekend. The idea is that on Monday morning before the change happens that weekend, I would like to be able to send out notices. I have looked at /usr/lib/tztab but that seems very complicated to me. Any ideas out there?&lt;BR /&gt;&lt;BR /&gt;TIA. Greg</description>
      <pubDate>Wed, 12 Mar 2003 19:33:38 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/when-does-dst-start/m-p/2925618#M110541</guid>
      <dc:creator>Greg White</dc:creator>
      <dc:date>2003-03-12T19:33:38Z</dc:date>
    </item>
    <item>
      <title>Re: When does DST start?</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/when-does-dst-start/m-p/2925619#M110542</link>
      <description>This year it starts April 6 at 2 am DST &lt;BR /&gt;Cheryl</description>
      <pubDate>Wed, 12 Mar 2003 19:37:19 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/when-does-dst-start/m-p/2925619#M110542</guid>
      <dc:creator>Cheryl Griffin</dc:creator>
      <dc:date>2003-03-12T19:37:19Z</dc:date>
    </item>
    <item>
      <title>Re: When does DST start?</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/when-does-dst-start/m-p/2925620#M110543</link>
      <description>Hi Greg:&lt;BR /&gt;&lt;BR /&gt;I would have a cron job that runs each Monday morning that calls the following one minute perl snippet. It looks at the DST setting for today and 1 week later and compares them. &lt;BR /&gt;---------------------------&lt;BR /&gt;#!/usr/bin/perl -w&lt;BR /&gt;use strict;&lt;BR /&gt;&lt;BR /&gt;use constant SECONDS_PER_DAY =&amp;gt; (24 * 60 * 60);&lt;BR /&gt;use constant DAYS_PER_WEEK =&amp;gt; 7;&lt;BR /&gt;&lt;BR /&gt;my $epoch = time();&lt;BR /&gt;my $isdst = (localtime($epoch))[8];&lt;BR /&gt;$epoch += (DAYS_PER_WEEK * SECONDS_PER_DAY);&lt;BR /&gt;my $isdst2 = (localtime($epoch))[8];&lt;BR /&gt;printf("%d\n",$isdst2 - $isdst);&lt;BR /&gt;&lt;BR /&gt;---------------------------&lt;BR /&gt;&lt;BR /&gt;This will print "1" going from Standard Time to DST; "-1" going from DST to Standard Time; and "0" if no change.&lt;BR /&gt;&lt;BR /&gt;That should get you started, Clay&lt;BR /&gt;</description>
      <pubDate>Wed, 12 Mar 2003 19:39:40 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/when-does-dst-start/m-p/2925620#M110543</guid>
      <dc:creator>A. Clay Stephenson</dc:creator>
      <dc:date>2003-03-12T19:39:40Z</dc:date>
    </item>
    <item>
      <title>Re: When does DST start?</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/when-does-dst-start/m-p/2925621#M110544</link>
      <description>There are sites like &lt;A href="http://www.energy.ca.gov/daylightsaving.html" target="_blank"&gt;http://www.energy.ca.gov/daylightsaving.html&lt;/A&gt; which has the history of DST but one that might help in your planning is this one &lt;A href="http://webexhibits.org/daylightsaving/b.html" target="_blank"&gt;http://webexhibits.org/daylightsaving/b.html&lt;/A&gt;  You can change the Year at the bottom of the page for planning and see years in advance when to expect the change.&lt;BR /&gt;&lt;BR /&gt;DST starts the first Sunday of every April.&lt;BR /&gt;Cheryl&lt;BR /&gt;</description>
      <pubDate>Wed, 12 Mar 2003 19:41:09 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/when-does-dst-start/m-p/2925621#M110544</guid>
      <dc:creator>Cheryl Griffin</dc:creator>
      <dc:date>2003-03-12T19:41:09Z</dc:date>
    </item>
    <item>
      <title>Re: When does DST start?</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/when-does-dst-start/m-p/2925622#M110545</link>
      <description>Hi Greg:&lt;BR /&gt;&lt;BR /&gt;This isn't as mysterious as it first appears.  The man pages for 'tztab(4)' give a good explanation.&lt;BR /&gt;&lt;BR /&gt;For "Eastern Standard Time, Eastern Daylight Time" (where I reside), the next time change during the years 1987-2038 occurs on the first Sunday (day=0) of the 4th month (April) during the first seven days (1-7).&lt;BR /&gt;&lt;BR /&gt;Looking at a calendar, this maps to Sunday, April 6, 2003.&lt;BR /&gt;&lt;BR /&gt;Regards!&lt;BR /&gt;&lt;BR /&gt;...JRF...</description>
      <pubDate>Wed, 12 Mar 2003 19:42:32 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/when-does-dst-start/m-p/2925622#M110545</guid>
      <dc:creator>James R. Ferguson</dc:creator>
      <dc:date>2003-03-12T19:42:32Z</dc:date>
    </item>
    <item>
      <title>Re: When does DST start?</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/when-does-dst-start/m-p/2925623#M110546</link>
      <description>One more point, Greg:&lt;BR /&gt;&lt;BR /&gt;This does assume that TZ has been set and also if you have users in multiple timezones you might need a cronjob for each with appropriate TZ settings for each.&lt;BR /&gt;</description>
      <pubDate>Wed, 12 Mar 2003 19:42:44 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/when-does-dst-start/m-p/2925623#M110546</guid>
      <dc:creator>A. Clay Stephenson</dc:creator>
      <dc:date>2003-03-12T19:42:44Z</dc:date>
    </item>
    <item>
      <title>Re: When does DST start?</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/when-does-dst-start/m-p/2925624#M110547</link>
      <description>Thanks everybody! That was fast! I cut and pasted  A. Clay's Perl script and it does just what I need.&lt;BR /&gt;&lt;BR /&gt;Greg</description>
      <pubDate>Wed, 12 Mar 2003 19:52:39 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/when-does-dst-start/m-p/2925624#M110547</guid>
      <dc:creator>Greg White</dc:creator>
      <dc:date>2003-03-12T19:52:39Z</dc:date>
    </item>
    <item>
      <title>Re: When does DST start?</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/when-does-dst-start/m-p/2925625#M110548</link>
      <description>Just thought I would give you an update. I used the Perl script and it works great although I can't test it. I did change it to simply exit with 1,0, or -1 instead of printing the result.&lt;BR /&gt;If the exit status is 0, the script does nothing but if it is -1 or 1 it sends mail to the users.&lt;BR /&gt;&lt;BR /&gt;Thanks everybody for your help.&lt;BR /&gt;Greg&lt;BR /&gt;</description>
      <pubDate>Wed, 12 Mar 2003 22:07:49 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/when-does-dst-start/m-p/2925625#M110548</guid>
      <dc:creator>Greg White</dc:creator>
      <dc:date>2003-03-12T22:07:49Z</dc:date>
    </item>
    <item>
      <title>Re: When does DST start?</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/when-does-dst-start/m-p/2925626#M110549</link>
      <description>Hi Greg:&lt;BR /&gt;&lt;BR /&gt;Actually you should be able to 'trick' it into returning a DST change. Simply increase the $epoch value more than 1 week where the $epoch += (SECONDS_PER_DAY * DAYS_PER_WEEK) is. make it something like $epoch += (SECONDS_PER_DAY * DAYS_PER_WEEK * 8). &lt;BR /&gt;&lt;BR /&gt;I would let the Perl script print the output and test that&lt;BR /&gt;because the shell is going to see an unsigned exit status in the range 0-255.&lt;BR /&gt;</description>
      <pubDate>Wed, 12 Mar 2003 22:42:56 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/when-does-dst-start/m-p/2925626#M110549</guid>
      <dc:creator>A. Clay Stephenson</dc:creator>
      <dc:date>2003-03-12T22:42:56Z</dc:date>
    </item>
  </channel>
</rss>

