HP3000-L Archives

October 1997, Week 4

HP3000-L@RAVEN.UTC.EDU

Options: Use Monospaced Font
Show Text Part by Default
Show All Mail Headers

Message: [<< First] [< Prev] [Next >] [Last >>]
Topic: [<< First] [< Prev] [Next >] [Last >>]
Author: [<< First] [< Prev] [Next >] [Last >>]

Print Reply
Subject:
From:
Brent Flowers <[log in to unmask]>
Reply To:
Brent Flowers <[log in to unmask]>
Date:
Wed, 22 Oct 1997 08:38:35 -0700
Content-Type:
text/plain
Parts/Attachments:
text/plain (181 lines)
David Hutchinson asked:
>>>What is the exact command syntax to change the time on the HP3000 5.5 ? Our
>>>Operator seems to always have a problem with this and brings the machine's
down and up.<<

[log in to unmask] replied:
>>>This is from the 5.5 Reference Manual Laserrom:
>SETCLOCK
>
>Alters the system time or system time zone.
>SYNTAX
>
>
>         {DATE= date spec; TIME= time spec [;GRADUAL]}
>         {                                 [;NOW    ]}
>SETCLOCK {                                           }
>         {CORRECTION= correction spec                }
>         {TIMEZONE= time zone spec                   }
>         {;CANCEL                                    }
>
>We're on 5.0 and happily use this command when it's time for
>'daylight-saving' adjustments (plus a couple of times/month since our
hardware-clock is a bit fast :-). The *big* change in 5.0 (and later) is
that you don't have reboot the machine in order to change the time. For
>more details try :HELP SETCLOCK ALL
>
>hth
/per<<

Let me add the following lengthy, but hopefully useful, post from the
Speedware KnowledgeBase [with my comments]:
>>$TIME, Time Zones, and Daylight Savings Time on the HP3000.

Is [the Speedware variable] $TIME [which uses the CTIME function] or
SHOWTIME (or both) returning the wrong time?  If so, then the first step
to correcting this problem would be to logon as MANAGER.SYS, and RUN
SHOWCLKS.PUBXL.TELESUP.  The output of this program shows all the
information you will need to solve your problem. The output will look
something like this:
***********************************************************
*** Greenwich Mean Time : THU, APR 27, 1995, 6:49 PM ***
*** GMT/MPE offset : -4:00:00 ***
*** MPE System Time : THU, APR 27, 1995, 2:49 PM ***
***********************************************************
*** C Library Information ***
Current value of Time Zone(TZ) variable: NOT ASSIGNED
CTIME function return : Thu Apr 27 14:49:05 1995

As you probably already know, Speedware's $TIME accesses the CPU's
Hardware clock. This is not the same clock that is used when you do a
SHOWTIME (SHOWTIME uses the Software clock). The Hardware clock should
always be set to GMT (Greenwich Mean Time), and the Software clock
should be set to your local time.

If your Hardware clock, Software clock and GMT/MPE offset are all
correct, but the CTIME function ($TIME) is not, then you only have to
set your TZ variable to your correct time zone (TZ is an HP session
variable). Use MPE's SETVAR command to do this (e.g.: SETVAR TZ
"PST8PDT" [for US/Canadian Pacific time zone]). You may want to set up a
system-wide LOGON UDC which issues the SETVAR command for all users
logging on to the system (see the file TZTAB.LIB.SYS for a list of
available values). When no TZ variable is set, HP3000 machines are, by
default, in the same time zone as New York (5 hours behind GMT). This
may explain why $TIME is off by 1 or more hours, depending on the time
zone you are in. If the TZ variable is not set, there may be a problem
that the change to or from daylight savings time happens on the wrong
date. If this occurs, set your TZ variable to "EST5EDT" [for US/Canadian
Eastern time zone]. Once you have set your TZ variable, RUN
SHOWCLKS.PUBXL.TELESUP again, everything should be fine now.

If the CTIME function ($TIME) is correct, but the MPE System Time
(SHOWTIME) is not (and you have the correct value for your TZ variable),
then your Software clock must be adjusted. This would occur if you just
switched to or from Daylight Savings Time (GMT is not affected by
Daylight Savings Time), in which case, your Software clock would be off
by 1 hour. The CTIME function automatically takes into account Daylight
Savings Time for your time zone (based on the value of your TZ variable)
whereas the Software clock does not (yes, this means you have to change
your Software clock twice a year if you use Daylight Savings Time!).
Your Software clock can be adjusted for Daylight Savings Time simply by
changing the value of the GMT/MPE offset:
- subtract 1 hour when switching to Daylight Savings Time (when you turn
your clock ahead 1 hour);
- add 1 hour when Daylight Savings Time ends (and you turn your clock
back 1 hour).

If you have any other discrepancies, you may have to change both
Hardware and Software clocks.

To change either of these clocks depends on what version of  the
operating system you are running. Prior to MPE/iX version 5.0, you must
SHUTDOWN your system to change both clocks: To change the Hardware
clock, type 'CLKUTIL' at the '>ISL' prompt (be sure to use Greenwich
Mean Time here when prompted); To change the Software clock, after
typing 'START RECOVERY/NORECOVERY' at the '>ISL' prompt, the current
system date and time will be displayed and you will be prompted to
change it (when you do, be sure to enter both date and time - if you
press Return without entering a date, it will default to January 1,
1985).

On MPE/iX 5.0, the new SETCLOCK command allows you to change both
Hardware and Software clock. The SHOWCLOCK command should first be used
to check the current settings for your system. The output looks
something like this:
SYSTEM TIME: THU, APR 27, 1995, 6:49:25 PM
CURRENT TIME CORRECTION: 0 SECONDS
TIME ZONE: 4 HOURS 0 MINUTES WESTERN HEMISPHERE

Depending on the results, changing the time may be a 1 or 2 step
process. If the TIME ZONE offset is correct, bypass Step 1 and go to
Step 2.

*** Step 1 ***

The Time Zone offset must be the first thing corrected, if necessary.
This will synchronize your Software clock to the current value of your
Hardware clock. This change may take place gradually, to protect the
data integrity of any systems using the Software clock for a timestamp.

The syntax to set the Timezone offset is:
SETCLOCK TIMEZONE={W/E}hh:mm
where {W/E} indicates that you are West or East of Greenwich, and hh:mm
indicates how many hours you are offset from GMT. For example, for
Mountain time, which is 7 hours behind GMT, the command would be:
SETCLOCK TIMEZONE=W7:00

The last thing the SETCLOCK command does is issue the SHOWCLOCK command.
You may notice a CURRENT TIME CORRECTION is in effect (value other than
0). This means that the Software clock will be changed gradually. If the
Software clock is being used as a timestamp, you should let the time
correction complete normally.

How long will it take for a time correction to complete?
- If a negative time correction is in effect, the clock will creep
forward slowly. On an idle system, the clock may appear to be almost
stopped. On a busy system, the clock will run at about half its normal
pace. Thus, a one-hour negative time correction will take between one
and two hours to complete, depending on how busy the system is.

- If a positive time correction is in effect, the clock will appear to
run at twice its normal pace. Thus a one-hour positive time correction
will take approximately one hour to complete.

If your Software clock is not being used for a timestamp, then you can
cancel the current time correction, allowing you to move on to the next
step (* Warning - do not do this unless you are going to do step 2 *).
Use the SETCLOCK command with the CANCEL parameter (i.e.:
SETCLOCK;CANCEL).

*** End of Step 1 ***

*** Step 2 ***

The last thing to be done, is set the value of the Hardware clock. The
syntax to do this is:
SETCLOCK DATE=mm/dd/yy[yy];TIME=hh:mm:ss [;GRADUAL/NOW]
- the century digits are optional on the date
- the TIME parameter cannot be specified without the DATE parameter. The
value specified here should be the current local time, not GMT.
- GRADUAL will cause the change to take place gradually.  This is the
default, and should be used if your Software clock is being used as a
timestamp.

SETCLOCK;CANCEL should not be used to try and speed things up, as it
will actually cancel the remainder of CURRENT TIME CORRECTION leaving
the system clock only partially updated.  If your Software clock is not
being used as a timestamp, or you want the time to be changed
immediately, specify the ;NOW parameter on the SETCLOCK command. For
example:
SETCLOCK DATE=04/27/95;TIME=14:49:00;NOW

*** End of Step 2 ***

That's all there is to it. Good Luck.<<

Here's to good times.
Brent Flowers, Speedware USA
E-MAIL: [log in to unmask]
TEL:  503-650-1321  FAX:  503-650-1324
http://www.speedware.com/

ATOM RSS1 RSS2