mirror of
https://github.com/PDP-10/its.git
synced 2026-03-02 18:04:38 +00:00
Updated netime and times to handle daily savings time.
This commit is contained in:
committed by
Lars Brinkhoff
parent
41bf05dc87
commit
f945bff100
@@ -221,6 +221,22 @@ MAPHST: MOVEI A,LSTPAG ;Page to map HOSTS3 in.
|
||||
MOVEI B,0
|
||||
CALL NETWRK"HSTMAP ;Map in the host table.
|
||||
JSR AUTPSY
|
||||
gmtdif==5.
|
||||
|
||||
tzcode:
|
||||
.rlpdtm a, ; get in a and b, # secs since beg of year in a
|
||||
came a,[-1]
|
||||
camn,[-1]
|
||||
jrst notz ; can't get tz
|
||||
tlnn b,10000 ; tz known?
|
||||
jrst notz ; no
|
||||
ldb a,[230400,,b] ; get absolute time TZ
|
||||
tlne c,4000 ; negative?
|
||||
movns a
|
||||
skipa
|
||||
notz: movei a,gmtdif ; default tz=5
|
||||
movem a,tzdiff ; save tz diff
|
||||
|
||||
SKIPE CHAOSP ;Tell luser which network we are using.
|
||||
JRST [ OUT(,("AChecking the time using CHAOS protocol: "))
|
||||
MOVEI E,CHATAB ;(Seperate tables for TCP and CHAOS.)
|
||||
@@ -248,6 +264,7 @@ SETUP3: AOBJN C,SETUP2 ;Go get another.
|
||||
JRST [ OUT(,("Subnet Site Greenwich Mean Time Local Time"),CRLF)
|
||||
JRST SETUP9 ]
|
||||
OUT(,("Network Site Greenwich Mean Time Local Time"),CRLF)
|
||||
|
||||
SETUP9: MOVSI C,-NHOSTS ;Number of hosts to poll.
|
||||
LOOP: SKIPN A,HOSTS(C) ;Get host address in A.
|
||||
JRST LOOP8 ; Ignore if zero.
|
||||
@@ -268,18 +285,30 @@ LOOP: SKIPN A,HOSTS(C) ;Get host address in A.
|
||||
LOOP5: MOVE B,A ;Remember network time.
|
||||
CALL DATIME"SECTIM ;Convert to time word.
|
||||
EXCH A,B ;GMT in B.
|
||||
SUBI A,DATIME"ESTDIF*60.*60.
|
||||
move tt,tzdiff ; get time zone difference
|
||||
imuli tt,60.
|
||||
imuli tt,60.
|
||||
sub a,tt
|
||||
CALL DATIME"SECTIM
|
||||
PUSH P,C
|
||||
PUSH P,B
|
||||
MOVE C,[SIXBIT / EST./]
|
||||
move b,tzdiff
|
||||
hlrz c,tznam(b) ;Assume standard
|
||||
call datime"odayl
|
||||
jrst [hrrz c,tznam(b) ; daylight
|
||||
skipn (c)
|
||||
MOVE C,[ASCIZ / EDT./]
|
||||
jrst .+3]
|
||||
skipn (c)
|
||||
MOVE C,[ASCIZ / EST./]
|
||||
|
||||
MOVEI B,3600.
|
||||
CALL DATIME"ODAYL
|
||||
CALL [ MOVE C,[SIXBIT / EDT./]
|
||||
JRST DATIME"TIMADD ]
|
||||
CALL DATIME"TIMADD
|
||||
POP P,B
|
||||
MOVE C,(C)
|
||||
OUT(,("H'"),TIM(MDYT,B),(" -> "))
|
||||
OUT(,TIM(MDYT,A),6F(C),CRLF)
|
||||
OUT(,TIM(MDYT,A),(" "),TZ(C),CRLF)
|
||||
POP P,C
|
||||
LOOP8: AOBJN C,LOOP
|
||||
|
||||
@@ -502,7 +531,25 @@ CHATAB:
|
||||
; [ASCIZ /APIARY-4/]
|
||||
CHATBL==.-CHATAB
|
||||
|
||||
|
||||
DEFINE TZONE STD,DST
|
||||
[ASCIZ /STD/],,[ASCIZ /DST/]
|
||||
TERMIN
|
||||
repeat 12.-2,TZONE ;Dunno -3..-12
|
||||
tzone EET,EEST ;-2
|
||||
tzone CET,CEST ;-1
|
||||
tznam: TZONE GMT,BST ; 0 How to ask for British Summer Time??
|
||||
TZONE ; 1
|
||||
TZONE ; 2
|
||||
TZONE ; 3 (NST = Newfoundland is -0330)
|
||||
TZONE AST,ADT ; 4 Atlantic
|
||||
TZONE EST,EDT ; 5 Eastern
|
||||
TZONE CST,CDT ; 6 Central
|
||||
TZONE MST,MDT ; 7 Mountain
|
||||
TZONE PST,PDT ; 8 Pacific
|
||||
TZONE YST,YDT ; 9 Yukon
|
||||
TZONE HST,HDT ; 10 Alaska-Hawaii
|
||||
TZONE BST,BDT ; 11 Bering
|
||||
REPEAT 24.-11.,TZONE ; 12-24 unspecified
|
||||
|
||||
SUBTTL Data.
|
||||
|
||||
@@ -513,7 +560,7 @@ PDL: BLOCK PDLLEN ;The Stack.
|
||||
DEBUG: 0 ;-1 => Debugging.
|
||||
TCPP: -1 ;-1 => Try TCP time servers.
|
||||
NCPP: 0 ;-1 => Try NCP time servers.
|
||||
CHAOSP: 0 ;-1 => Try Chaosnet servers.
|
||||
CHAOSP: 0 ;-1 => Try Chaosnet servers (gets set to -1 if JNAME is CTIMES)
|
||||
UDPP: 0 ;-1 => Try ARPAnet UDP servers (not implemented yet).
|
||||
|
||||
TCMXH: 0
|
||||
@@ -524,6 +571,8 @@ OWNHST: 0 ;My host address.
|
||||
HSTNUM: 0 ;HOSTS3 address to connect to.
|
||||
GOTTCP: 0 ;-1 => Got the info from TCP.
|
||||
|
||||
TZDIFF: 0
|
||||
|
||||
NETDEV: SIXBIT /NET/
|
||||
NTMSOC: 45 ; Socket to connect to
|
||||
HOSTS: BLOCK NHOSTS ;Table of host addresses.
|
||||
Reference in New Issue
Block a user