LOCAL MEAN TIME TO LOCAL SIDEREAL TIME

Disp "M:D:YEAR" is a reminder for the forthcoming prompt (Prompt A,B,C)  that asks for the month, day and year as 2, then 5, and finally 2002. The second prompt asks for the hour, minute and second (UT) of interest. Remember, that if the desired UT moves into the next day, you must input the following day at the "B" prompt. For example, at 20:00 MST, UTC is 03:00-the following day.
This  algorithm is written for MST as the output.  You must correct for the desired time zone and for the deviation of your location of interest relative to the start of the appropriate time zone.  Thus, 7.124619445 designates 27 min 43 sec west of the start of the MST zone (+7 hr relative to UTC).
This algorithm provides the local sidereal time to the nearest whole second but can provide greater accuracy by simple manipulation of the decimal point prior to data output.
<=  denotes less than or equal to
The output data are accurate to the nearest whole second



Disp "M:D:YEAR"
Prompt A,B,C
If A<=2
Then
A+12->A
C-1->C
End
19->D
-13->E
iPart((365.25*C)->F
iPart(((A+1)*30.6001)->G
E+F+G+B+1720994.5->\X
X-2451545->S
S/36525->T
6.697374558+(2400.051336T)+(0.000025862T2)->V
If V>24
Goto M
If V<0
Goto H
Lbl M
While V>24
V-24->V
End
Lbl H
While V<0
V+24->V
End
Disp "MST"
Prompt O,P,Q
O+P/60+Q/3600->W
W+7->W
(Wx1.0027379094)+V->Z
Z-7.124619445->Y
If Y<0
24+Y->Y
If Y>24
Then
Y-24->Y
End
Fix 2
iPart(Y)->q
Disp "MST"
Disp "HOUR", q
Fix 2
60xfPart((Y)->A
iPart(A)->q
Fix 0
Disp "MINUTE", q
Fix 2
60xfPart(A)->J
Fix 0
Disp "SECOND", J
Float

Your comments and suggestions are always welcome: gar8@earthlink.net
13, April 20:0:0 UTC