<?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: Date question addendum in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/date-question-addendum/m-p/2745333#M722013</link>
    <description>caljd.sh is a great tool. But perl has some built in functions to work with GMT.&lt;BR /&gt;&lt;BR /&gt;perl -e 'print scalar gmtime(time()+7*24*60*60)),"\n"'&lt;BR /&gt;&lt;BR /&gt;will print the date 7 days in the future relative to GMT.&lt;BR /&gt;&lt;BR /&gt;-- Rod Hills</description>
    <pubDate>Fri, 14 Jun 2002 20:55:16 GMT</pubDate>
    <dc:creator>Rodney Hills</dc:creator>
    <dc:date>2002-06-14T20:55:16Z</dc:date>
    <item>
      <title>Date question addendum</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/date-question-addendum/m-p/2745331#M722011</link>
      <description>Hello again,&lt;BR /&gt;&lt;BR /&gt;This is an addendum to my earlier date question. I've used A. Clay Stephenson's "date hammer" to fix part of my script. Now I have another question. Because we have offices located in several timezones, we need to get a date one week from the current date in GMT. We don't want to have to change the timezone on the server just to make this work.  Based upon Clay's earlier answer, I have gotten this far:&lt;BR /&gt;&lt;BR /&gt;CURRDATE_7=$(caljd.sh -e -S "-" $(caljd.sh -n 7))&lt;BR /&gt;&lt;BR /&gt;The problem is that this is PDT and we need it to work in GMT.&lt;BR /&gt;&lt;BR /&gt;Thanks in advance for your help,&lt;BR /&gt;Kris</description>
      <pubDate>Fri, 14 Jun 2002 20:41:16 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/date-question-addendum/m-p/2745331#M722011</guid>
      <dc:creator>Kris Spander</dc:creator>
      <dc:date>2002-06-14T20:41:16Z</dc:date>
    </item>
    <item>
      <title>Re: Date question addendum</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/date-question-addendum/m-p/2745332#M722012</link>
      <description>Hi Kris:&lt;BR /&gt;&lt;BR /&gt;This is pretty easy. Remember that all UNIX boxes in the known universe keep time by simply&lt;BR /&gt;counting the number of seconds since the Earth was created - Jan. 1, 1970 UTC. The TZ setting only determines how the time is DISPLAYED in a given process's environment. You can simply do&lt;BR /&gt;an "export TZ=GMT0" before the call to caljd.sh&lt;BR /&gt;BUT it's even easier to do than that.&lt;BR /&gt;&lt;BR /&gt;Simply change:&lt;BR /&gt;CURRDATE_7=$(caljd.sh -e -S "-" $(caljd.sh -n 7)) &lt;BR /&gt;to:&lt;BR /&gt;CURRDATE_7=$(caljd.sh -e -S "-" $(caljd.sh -U -n 7)) &lt;BR /&gt;&lt;BR /&gt;The -U does exactly what you want. &lt;BR /&gt;&lt;BR /&gt;P.S. You should have done a caljd.sh -u and read the usage message carefully. It would have told you this.&lt;BR /&gt;&lt;BR /&gt;Regards, Clay&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Fri, 14 Jun 2002 20:49:18 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/date-question-addendum/m-p/2745332#M722012</guid>
      <dc:creator>A. Clay Stephenson</dc:creator>
      <dc:date>2002-06-14T20:49:18Z</dc:date>
    </item>
    <item>
      <title>Re: Date question addendum</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/date-question-addendum/m-p/2745333#M722013</link>
      <description>caljd.sh is a great tool. But perl has some built in functions to work with GMT.&lt;BR /&gt;&lt;BR /&gt;perl -e 'print scalar gmtime(time()+7*24*60*60)),"\n"'&lt;BR /&gt;&lt;BR /&gt;will print the date 7 days in the future relative to GMT.&lt;BR /&gt;&lt;BR /&gt;-- Rod Hills</description>
      <pubDate>Fri, 14 Jun 2002 20:55:16 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/date-question-addendum/m-p/2745333#M722013</guid>
      <dc:creator>Rodney Hills</dc:creator>
      <dc:date>2002-06-14T20:55:16Z</dc:date>
    </item>
    <item>
      <title>Re: Date question addendum</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/date-question-addendum/m-p/2745334#M722014</link>
      <description>Thanks to both of you. Clay, I did a caljd.sh -u and now I feel really dumb. The answer was there all the time. I did a search on "caljd.sh" and I am absolutely amazed at the number of "hits" that I got. I really expected to see lots and lots of if's and case's in the calculations but they weren't there. That is some script!!!&lt;BR /&gt;&lt;BR /&gt;Thanks again,&lt;BR /&gt;Kris</description>
      <pubDate>Mon, 17 Jun 2002 17:07:02 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/date-question-addendum/m-p/2745334#M722014</guid>
      <dc:creator>Kris Spander</dc:creator>
      <dc:date>2002-06-17T17:07:02Z</dc:date>
    </item>
    <item>
      <title>Re: Date question addendum</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/date-question-addendum/m-p/2745335#M722015</link>
      <description>Hi Kris:&lt;BR /&gt;&lt;BR /&gt;I'm glad you liked the script. I really can't take credit for the calendar date to Julian Day&lt;BR /&gt;and the Julian Day to calendar date algorithms.  Julian Days have been around a very long time and if you ever took an astrophysics course or an advanced mechanics course, you would have been introduced to them.&lt;BR /&gt;The algorithms I used are based on some that were published many years ago in 'Sky and Telescope' magazine. (If you are any kind of sky buff, you have a subscription.) &lt;BR /&gt;&lt;BR /&gt;I just added some command-line parsing and holidays stuff to the existing algorithms.&lt;BR /&gt;&lt;BR /&gt;Regards, Clay&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Mon, 17 Jun 2002 17:22:06 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/date-question-addendum/m-p/2745335#M722015</guid>
      <dc:creator>A. Clay Stephenson</dc:creator>
      <dc:date>2002-06-17T17:22:06Z</dc:date>
    </item>
  </channel>
</rss>

