<?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 set_parms date_time error in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/set-parms-date-time-error/m-p/3093076#M145334</link>
    <description>I get this error on an 11.00 system when&lt;BR /&gt;using set_parms date_time to set the date of the month to either 8 or 9. All other days&lt;BR /&gt;of the month work and I get the prompt to&lt;BR /&gt;enter the hour of the day.&lt;BR /&gt;Thanks,&lt;BR /&gt;-Nivesh&lt;BR /&gt;&lt;BR /&gt;_______________________________________________________________________________&lt;BR /&gt;&lt;BR /&gt;You will be prompted for the date and time.  Please enter all values&lt;BR /&gt;numerically, for example January is 1.  The values in the parentheses&lt;BR /&gt;give the acceptable range of responses.&lt;BR /&gt;_______________________________________________________________________________&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Please enter the last two digits of the year (00-99), then press [Return] 03&lt;BR /&gt;&lt;BR /&gt;Please enter the month (1-12), then press [Return] 10&lt;BR /&gt;&lt;BR /&gt;Please enter the date of the month (1-31), then press [Return] 8&lt;BR /&gt;/sbin/set_parms.d/12_date_time[55]: 08: The specified number is not valid for th&lt;BR /&gt;is command.&lt;BR /&gt;#</description>
    <pubDate>Tue, 14 Oct 2003 13:13:23 GMT</pubDate>
    <dc:creator>Nivesh Patnaik</dc:creator>
    <dc:date>2003-10-14T13:13:23Z</dc:date>
    <item>
      <title>set_parms date_time error</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/set-parms-date-time-error/m-p/3093076#M145334</link>
      <description>I get this error on an 11.00 system when&lt;BR /&gt;using set_parms date_time to set the date of the month to either 8 or 9. All other days&lt;BR /&gt;of the month work and I get the prompt to&lt;BR /&gt;enter the hour of the day.&lt;BR /&gt;Thanks,&lt;BR /&gt;-Nivesh&lt;BR /&gt;&lt;BR /&gt;_______________________________________________________________________________&lt;BR /&gt;&lt;BR /&gt;You will be prompted for the date and time.  Please enter all values&lt;BR /&gt;numerically, for example January is 1.  The values in the parentheses&lt;BR /&gt;give the acceptable range of responses.&lt;BR /&gt;_______________________________________________________________________________&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Please enter the last two digits of the year (00-99), then press [Return] 03&lt;BR /&gt;&lt;BR /&gt;Please enter the month (1-12), then press [Return] 10&lt;BR /&gt;&lt;BR /&gt;Please enter the date of the month (1-31), then press [Return] 8&lt;BR /&gt;/sbin/set_parms.d/12_date_time[55]: 08: The specified number is not valid for th&lt;BR /&gt;is command.&lt;BR /&gt;#</description>
      <pubDate>Tue, 14 Oct 2003 13:13:23 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/set-parms-date-time-error/m-p/3093076#M145334</guid>
      <dc:creator>Nivesh Patnaik</dc:creator>
      <dc:date>2003-10-14T13:13:23Z</dc:date>
    </item>
    <item>
      <title>Re: set_parms date_time error</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/set-parms-date-time-error/m-p/3093077#M145335</link>
      <description>Well the odd thing about this is that that error message isn't in the script at all.  It looks like that 08 is being used where it shouldn't be.  Is there any possibility at all that your keyboard has some funny mapping for those two numbers because I can't see where that extra zero comes in.</description>
      <pubDate>Tue, 14 Oct 2003 13:22:39 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/set-parms-date-time-error/m-p/3093077#M145335</guid>
      <dc:creator>Mark Grant</dc:creator>
      <dc:date>2003-10-14T13:22:39Z</dc:date>
    </item>
    <item>
      <title>Re: set_parms date_time error</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/set-parms-date-time-error/m-p/3093078#M145336</link>
      <description>/sbin/set_parms.d/12_date_time gets executed.&lt;BR /&gt;I checked the function that gets called when&lt;BR /&gt;running set_parms from a CUI session.&lt;BR /&gt;&lt;BR /&gt;Here is the excerpt:&lt;BR /&gt;&lt;BR /&gt;########################################################&lt;BR /&gt;#&lt;BR /&gt;# This function actually prompts the user for the time/date info.&lt;BR /&gt;#&lt;BR /&gt;time_set()&lt;BR /&gt;{&lt;BR /&gt;&lt;BR /&gt;# Define date/time variables as 2 digits, right justified, leading zero filled.&lt;BR /&gt;typeset -Z2 century year month day hour minute&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;This is why, when the variable day gets read,&lt;BR /&gt;it left pads the 8 with a zero.&lt;BR /&gt;&lt;BR /&gt;The error occurs when the following piece of&lt;BR /&gt;code executes:&lt;BR /&gt;&lt;BR /&gt;# Read the day&lt;BR /&gt;    while :&lt;BR /&gt;    do&lt;BR /&gt;       echo "\nPlease enter the date of the month (1-31), then press [Return] \c&lt;BR /&gt;"&lt;BR /&gt;       read day&lt;BR /&gt;       if (( day &amp;gt; 0 )) &amp;amp;&amp;amp; check_day&lt;BR /&gt;       then&lt;BR /&gt;           break&lt;BR /&gt;       else&lt;BR /&gt;           Retry "Day number out of range for the month.\n"&lt;BR /&gt;       fi&lt;BR /&gt;    done&lt;BR /&gt;&lt;BR /&gt;Right where it does "if (( day &amp;gt; 0 )) &amp;amp;&amp;amp; check_day" is when the error occurs. I even tried one condition at a time, and both the&lt;BR /&gt;conditions generated the error.&lt;BR /&gt;&lt;BR /&gt;Strange, the error happens for only the number 8 and 9 as the date of the month.</description>
      <pubDate>Tue, 14 Oct 2003 13:29:00 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/set-parms-date-time-error/m-p/3093078#M145336</guid>
      <dc:creator>Nivesh Patnaik</dc:creator>
      <dc:date>2003-10-14T13:29:00Z</dc:date>
    </item>
    <item>
      <title>Re: set_parms date_time error</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/set-parms-date-time-error/m-p/3093079#M145337</link>
      <description>It looks as though there is a bug in the shell that is treating typeset -Z2 variables&lt;BR /&gt;with single leading zeroes as octal and that is why 08 and 09 are failing. They are invalid octal values. I've seen this sort of problem before. Look for cumulative shell patches.&lt;BR /&gt;</description>
      <pubDate>Tue, 14 Oct 2003 13:35:12 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/set-parms-date-time-error/m-p/3093079#M145337</guid>
      <dc:creator>A. Clay Stephenson</dc:creator>
      <dc:date>2003-10-14T13:35:12Z</dc:date>
    </item>
    <item>
      <title>Re: set_parms date_time error</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/set-parms-date-time-error/m-p/3093080#M145338</link>
      <description>Try loading the latest patch&lt;BR /&gt;&lt;BR /&gt;&lt;A href="http://www2.itrc.hp.com/service/cki/patchDocDisplay.do?patchId=PHCO_22957" target="_blank"&gt;http://www2.itrc.hp.com/service/cki/patchDocDisplay.do?patchId=PHCO_22957&lt;/A&gt;</description>
      <pubDate>Tue, 14 Oct 2003 23:57:32 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/set-parms-date-time-error/m-p/3093080#M145338</guid>
      <dc:creator>T G Manikandan</dc:creator>
      <dc:date>2003-10-14T23:57:32Z</dc:date>
    </item>
    <item>
      <title>Re: set_parms date_time error</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/set-parms-date-time-error/m-p/3093081#M145339</link>
      <description>Hi Nivesh,&lt;BR /&gt;your system has apparently installed patch PHCO_26789.&lt;BR /&gt;The description for this patch says, among other things:&lt;BR /&gt; &lt;BR /&gt;"...This patch also fixes the POSIX shell to adhere to ISOC standards by recognizing octal and hexa decimal notations ."  &lt;BR /&gt;&lt;BR /&gt;which means that a number starting with zero will be recognized as an octal number; hence the problem with illegal octal numbers as 8 and 9. It suggests a workaround but only for one particular script.&lt;BR /&gt;I have tried to search for an anti-PHCO_26789 patch, but without luck; perhaps other people have more success.&lt;BR /&gt; If the alternatives are to either uninstall the patch or use a non-posix shell, I think it would be a good idea to ask HP directly.&lt;BR /&gt;If you do that, please tell us about the result.&lt;BR /&gt; &lt;BR /&gt;regards,&lt;BR /&gt;John K.</description>
      <pubDate>Wed, 15 Oct 2003 02:31:22 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/set-parms-date-time-error/m-p/3093081#M145339</guid>
      <dc:creator>john korterman</dc:creator>
      <dc:date>2003-10-15T02:31:22Z</dc:date>
    </item>
    <item>
      <title>Re: set_parms date_time error</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/set-parms-date-time-error/m-p/3093082#M145340</link>
      <description>Just for proof of concept I modified the&lt;BR /&gt;code for set_parms and /sbin/set_parms.d/12_date_time so that the single&lt;BR /&gt;digit date would be read as input, and&lt;BR /&gt;the left padding of zero would be performed&lt;BR /&gt;after the date checked out okay. This fix had to be done in two places, for the Xserver related functions and the straight terminal functions. That worked! Dates of 8 and 9 were accepted without any errors.&lt;BR /&gt;&lt;BR /&gt;Then I reverted to the original HP versions&lt;BR /&gt;of set_parms and dependent scripts, and then uninstalled PHCO_23744 which had come off&lt;BR /&gt;the Quality Pack bundle for 11.00, March 2003.&lt;BR /&gt;&lt;BR /&gt;That still left me with /sbin/sh from PHCO_23744 instead of the one from PHCO_18447&lt;BR /&gt;which it should have reverted to. Cannot&lt;BR /&gt;simply clobber /sbin/sh ofcourse!&lt;BR /&gt;&lt;BR /&gt;So I installed PHCO_20816 because I didn't&lt;BR /&gt;want to encounter the eval aborts with syntax&lt;BR /&gt;errors introduced in PHCO_22537 and PHCO_23873.&lt;BR /&gt;&lt;BR /&gt;set_parms date_time now works fabulously with&lt;BR /&gt;the POSIX shell that came off PHCO_20816.&lt;BR /&gt;&lt;BR /&gt;Problem fixed. Thank you all for your input.&lt;BR /&gt;&lt;BR /&gt;-Nivesh</description>
      <pubDate>Wed, 15 Oct 2003 09:36:45 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/set-parms-date-time-error/m-p/3093082#M145340</guid>
      <dc:creator>Nivesh Patnaik</dc:creator>
      <dc:date>2003-10-15T09:36:45Z</dc:date>
    </item>
  </channel>
</rss>

