Easy enough:
on *:load:{
hmake timezones
;; Add offsets from GMT in seconds
hadd timezones _list Johhannesburg Auckland Vancouver Tokyo
hadd timezones Johhannesburg 0
hadd timezones Auckland 43200
hadd timezones Vancouver -36000
hadd timezones Tokyo 32400
}
on *:text:!time:#:{
var %list = $hget(timezones,_list)
var %n = $numtok(%list,32), %i = 1
while (%i <= %n) {
var %place = $gettok(%list,%i,32), %offset = $hget(timezones,%place)
var %time = $gmt + %offset
msg $chan %place - $asctime(%time)
inc %i
}
}
I'm fairly certain of the calculations here, although my offset values might not be quite right...
To extend, just add an entry to the hash with the appropriate offset in seconds from GMT, and add the name to the _list item. (The latter is strictly not necessary, but it does mean you can store many different offsets, and only display a few of them, instead of cycling throught the entire hash)