# WTime3.bas

draw -1

dim a$(26)

a$(1)="+0": a$(2)="-1"

a$(3)="-2" : a$(4)="-3"

a$(5)="-4" : a$(6)="-5"

a$(7)="-6" : a$(8)="-7"

a$(9)="-8" : a$(10)="-9"

a$(11)="-10" : a$(12)="-11"

a$(13)="-12" : a$(14)="+11"

a$(15)="+10" : a$(16)="+9"

a$(17)="+8" : a$(18)="+7"

a$(19)="+6" : a$(20)="+5"

a$(21)="+4" : a$(22)="+3"

a$(23)="+2" : a$(24)="+1

dim b$(26)

b$(1)="London, UK"

b$(2)="Paris, FR"

b$(3)="city3"

b$(4)="city4"

b$(5)="city5"

b$(6)="city6"

b$(7)="city7"

b$(8)="city8"

b$(9)="city9"

b$(10)="city10"

b$(11)="city11"

b$(12)="city12"

b$(13)="city -11"

b$(14)="city -10"

b$(15)="city -9"

b$(16)="city -8"

b$(17)="city -7"

b$(18)="city -6"

b$(19)="city -5"

b$(20)="city -4"

b$(21)="city -3"

b$(22)="city -2"

b$(23)="city -1"

b$(24)="city -0"

form lst 60,20,24,8,a$,1

form lst 0,42,24,8,b$,1

draw "Local Time",2,20,1

draw "London, UK (GMT)",2,31

while

twelve$ = "12"

sysTime$ = fn time$(0)

time%=val(sysTime$)

time2%=val(sysTime$)

if time% < 125959 then adjTime% = time%

if time% > 125959 then adjTime% = time% - 120000

time$ = str$(adjTime%,6)

second$ = mid$(time$,5,2)

minute$ = mid$(time$,3,2)

hour$ = mid$(time$,1,2)

if time% < 5959 then hour$ = twelve$

colon$=":"

am$="a" : pm$="p"

draw hour$,120,20

draw minute$,132,20

draw second$,144,20

draw colon$,130,20

draw colon$,142,20

if time% > 115959 then draw pm$,155,20

if time% < 115959 then draw am$,155,20

## Make GMT ##

timeZone%=val(s$(0))

if timeZone% <13 then selection% = (timeZone% - 13)

if timeZone% >13 then selection% = (timeZone% - 13)

i$=time2%:draw "time2%  "+i$,20,60

gmt% = time2% + selection% * 10000

if gmt% > 115959 then draw pm$,155,31

if gmt% < 115959 then draw am$,155,31

r$=gmt%:draw "gmt$  "+r$,20,70

if gmt% > 240000 then gmt% = gmt% - 120000

gmtFeed%=gmt%

if gmt% > 125959 then gmt% = gmt% - 120000

gmtTime$ = str$(gmt%,6)

if val(gmtTime$) < 5959 then hour$ = twelve$

hour$ = mid$(gmtTime$,1,2)

draw hour$,120,31

draw minute$,132,31

draw second$,144,31

draw colon$,130,31

draw colon$,142,31

## Display 1 ##

city1% = val(s$(1))

if city1% > 12  then city1% = (12 - city1%) * (-1)

disp1% = gmtFeed% + (city1% - 1) * 10000

if disp1% > 115959 then draw pm$,155,42

if disp1% < 115959 then draw am$,155,42

if disp1% > 240000 then disp1% = disp1% - 120000

if disp1% > 125959 then disp1% = disp1% - 120000

time3$=str$(disp1%,6)

hour$=mid$(time3$,1,2)

if disp1% < 5959 then hour$ = twelve$

draw hour$,120,42

draw minute$,132,42

draw second$,144,42

draw colon$,130,42

draw colon$,142,42

wend

end

    Source: geocities.com/greenchile505