home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Club Amiga de Montreal - CAM
/
CAM_CD_1.iso
/
files
/
296.lha
/
DST_v1.05
/
dst.doc
< prev
next >
Wrap
Text File
|
1989-10-09
|
5KB
|
91 lines
Program: dst
Programmer: George Kerber
Written: 05/29/89 - 07/08/89
Version: 1.05
Application: AmigaDOS
Purpose: This utility will always insure that the system clock
(not the battery backed-up clock) will always be correct
during Daylight Savings Time or Standard Time.
Requirements: "Battery backup-clock" and AmigaDOS 1.3.
Directions: Add "dst [opt]" to your startup-sequence after the battery
clock has been read and env: has been created and assigned.
Set your battery clock to STANDARD TIME in your area.
These commands need to be in your startup-sequence before
running "dst". Note: these commands are standard when
using AmigaDOS 1.3, but should work ok if using 1.2.
makedir ram:env
assign env: ram:env
Everytime the Amiga is booted, the "dst" utility will then
read the system clock and extract the year. Then the start
and stop date for Daylight Savings time will be calculated
for the current year. If the current date falls between
these dates, the system clock will be incremented by one
hour for Daylight Savings Time. If "dst" is run again
after the initial time, "dst" will do nothing to the
system clock.
Options: dst e -- Eastern Region
dst c -- Central Region
dst m -- Mountain Region
dst p -- Pacific Region
dst d -- Generic
dst f -- Force evaluation
dst ? -- Short help screen
Using any one of the first group of options will cause "dst"
to display the current zone time.
Example: dst m -----returns---> Mountain Daylight Time
or-> Mountain Standard Time
To set the correct timezone, but have no output to the
screen, send the output to :NIL.
dst >NIL: m
Using the "f" option will cause "dst" to increment the
system clock if it is currently Daylight Savings Time
even if it's already been incremented.
Considerations: The "dst" utility knows that Daylight Savings Time actually
begins and ends after 2am on it's start and stop date.
"dst will not do anything to the system clock if the
computer is running at the change over date and time.
I figured that very few people are using their computers
at 2am. Nor will "dst" decrement the system clock if
invoked right after the Daylight Savings Time stop date and
time. None of this should be a problem. There is a "cron"
type program available on the boards that could be run and
would fix everything (if I had written "dst" to accommodate
it), but it sure didn't seem worth all the work and
computer overhead using cron that would only be necessary
twice a year if the user was actually using the Amiga at
2am on the start and stop dates.
"dst" will set an environmental variable called "TIMEZONE"
with the current timezone. This will be STD or DST if no
option is given when "dst" is initially executed. If the
correct option is given when first executed, then "TIMEZONE"
will contain the correct timezone for your area. TIMEZONE
is used by a program called "udate" which is UNIX like and
is a replacement for the AmigaDOS date command.
Status: This is public domain, but please keep me as author and
keep all the documentation intact. Anyway, if something
is wrong with this program, I'm not responsible.....
Version 1.05: This version works identically as the previous version that
was uploaded, except that the environmental variable
TIMEZONE now contains the current timezone. This variable
is used if available by the udate program, which is a
UNIX like date command. Udate is public domain too.