FB II Compiler

PG PRO

Debugging

Memory

System

Mathematics

Resources

Disk I/O

Windows

Controls

Menus

Mouse

Keyboard

Text

Fonts

Drawing

Sound

Clipboard

Printing

Communication

ASM

Made with FB

MATHEMATICS

Find daylight saving time


It is actually set in PRAM, not in a resource. Are you trying to read the DST status or to alter it? Here's a short program that demonstrates how to read it:
_machineLocation = 12                             '(record size)
'-------------------------------------------------
LOCAL FN ReadLocation(locRecAddr&)
  'Call as follows:
  '  FN ReadLocation(@myLocn)
  'where myLocn is a 12-byte record
  `     MOVE.L  ^locRecAddr&,A0
  `     MOVE.L  #$000C00E4,D0
  `     DC.W    $A051
END FN
'----------------------------------------------------------
LOCAL FN CurrentDSTstate
  'Returns the value of the DST byte stored in PRAM.
  'This is nonzero if DST is in effect.
  DIM thisMachine.machineLocation
  FN ReadLocation(@thisMachine)
END FN = PEEK(@thisMachine + _dlsDelta)
'------------------------------------------
CLS
PRINT "Daylight Savings Time is currently ";
IF FN CurrentDSTstate <> 0 THEN PRINT "ON" ELSE PRINT "OFF"
DO
  HANDLEEVENTS
UNTIL _false
'----------------------------------------
Setting the DST on or off is a little trickier. To alter it in a way that has the same effect as the Date & Time control panel, you really need to do adjust three things:

* The system clock (set it forward or back by an hour, by calling SetDateTime);
* The _dlsDelta byte (by calling the Toolbox routine WriteLocation);
* Your "time zone" information (also via WriteLocation). Your Time Zone information measures how much your system clock differs from Greenwich time, which is different when you're on DST than when you're off it.

I have some code that will do all this, if you're interested (I wrote a program that goes in my Startup folder and automatically makes these DST adjustments for me at the appropriate times of the year).
Rick