Operating System - OpenVMS
cancel
Showing results for 
Search instead for 
Did you mean: 

DST Time Drift

 
SOLVED
Go to solution
Highlighted
Trusted Contributor

DST Time Drift

We use the old Springforward/Fallback macro for drifting time for the DST time.

The macro has the following:
$ IF F$GETSYI("HW_MODEL") .LT. 1024
$ THEN FIVE_HOURS = "1800000" !VAX
$ ELSE FIVE_HOURS = "18433179" !AXP

Where do I get the value for the FIVE_HOURS?
I am trying to setup the same macro to be tested on Itanium.
12 REPLIES 12
Highlighted
Honored Contributor
Solution

Re: DST Time Drift

Peter,

The value 18433179 is 5x60x60x1024, in other words, the number of 1024Hz ticks in 5 minutes - the Alpha clock interval. (well, actually it's not quite that value, I think it should be 18432000, but I don't know what the programmer was thinking). The VAX number is 5x60x60*100 which is the number of 100Hz (10mSec) ticks in 5 minutes, the VAX clock interval.

I think the I64 value should be the same as the Alpha number.
A crucible of informative mistakes
Highlighted
Honored Contributor

Re: DST Time Drift

FWIW,

If I were writing that code, I would have written it as:

$ FreqVAX = 100
$ FreqAlpha = 1024
$ FreqI64 = 1024 ! ?
$ FIVE_HOURS=5*60*60*Freq'F$GETSYI("ARCH_NAME")'

to make the theory and reasoning more obvious.

I'd be even happier if I could find a $GETSYI item to return EXE$GL_SYSTICK so the value could be derived in an architecture independent manner, rather than hard coded.

You can confirm the I64 value by comparing EXE$GL_SYSTICK between I64 and Alpha. The Alpha value is %X2625 = 9765 Decimal, which means .0009765 seconds, or 1/1024th second.
A crucible of informative mistakes
Highlighted
Trusted Contributor

Re: DST Time Drift

The values from my itaniums.

SDA> exa EXE$GL_SYSTICK
EXE$GL_SYSTICK: 00000000.00002710 ".'......"
SDA> EXAM EXE$GL_TICKLENGTH
EXE$GL_TICKLENGTH: 00000000.00002710 ".'......"


18432000 as the five_hours would make more sense for the alpha.
Highlighted
Honored Contributor

Re: DST Time Drift

Peter,

> The values from my itaniums
>
> SDA> exa EXE$GL_SYSTICK
> EXE$GL_SYSTICK: 00000000.00002710 ".'......"

That's 10000 decimal, so the frequency on I64 is 1000. Your FIVE_HOURS should therefore be 18000000. My version would be:

$ FreqVAX = 100
$ FreqAlpha = 1024
$ FreqI64 = 1000
$ FIVE_HOURS=5*60*60*Freq'F$GETSYI("ARCH_NAME")'

(I'm also assuming that ARCH_NAME returns the string I64, but no access to an I64 system to check)
A crucible of informative mistakes
Highlighted
Trusted Contributor

Re: DST Time Drift

arch_name = IA64
Highlighted
Honored Contributor

Re: DST Time Drift

Highlighted
Frequent Advisor

Re: DST Time Drift


Wouldn't that tick be CPU speed dependent as well as platform dependent?

My Alpha 4100 5/600s give a value of 208D Hex, or 8333 (1/1200th second) and not the 2625 Hex (1/1024th second) John listed above.
Highlighted
Trusted Contributor

Re: DST Time Drift

I thought the CPU dependent value was EXE$GL_TICKLENGTH. This is the one we have been having to change on each different version of alpha cpu to get the drift right.
Highlighted
Frequent Advisor

Re: DST Time Drift


Could be because I'm on version 7.1. I get the same value returned for exe$gl_systick and exe$gl_ticklength.