/* time ticker script */

call RxFuncAdd 'SysLoadFuncs', 'RexxUtil', 'SysLoadFuncs'
call SysLoadFuncs

               /* note: this script is written for Germany */
               /* unfortunatly it is not possible, to ask OS/2 */
               /* about your local timezone */
local = 1      /* German (summer)time = GMT +1 */
hawaii = -10   /* Hawaiian (summer)time = GMT -10 */

language = SysIni('ticker.ini', 'TICKER', 'LANGUAGE')

if ((language = 'FEHLER:') | (language = 'ERROR:')) then 
  language = 'US ENGLISH'

minutes = time('M')
hours = minutes % 60
minutes = minutes // 60

hhours = hours - local + hawaii   /* hours in hawaii */

if (hhours < 0) then
    hhours = hhours + 24
if (hhours > 24) then
    hhours = hhours - 24

if (hours < 10) then hours = '0'hours
if (hhours < 10) then hhours = '0'hhours
if (minutes < 10) then minutes = '0'minutes

timestr = hours':'minutes'   Hawaii: 'hhours':'minutes

if (language = 'GERMAN') then
  str = ' Lokal: 'timestr' (Annahme: lokale Zeit ist MDT) '
else
  str = ' Local: 'timestr' (Assumed: local time is MDT) '

call addTicker str, timetck, 60, green

exit
