View/Edit #12:@timezone @tz

Switch to edit mode.

Name(s): @timezone @tz
1:  if (player != this)
2:    return $msg:mtell("huh")
3:  endif
4:  player:tell("Your current time zone is ", this.timezone_spec, " (", this:ctime(), ").")
5:  if (!argstr)
6:    return player:tell("Type '", verb, " list' to get a list of all valid time zones.")
7:  elseif (argstr == "list")
8:    return player:tell({"", "Valid time zones:", @$su:columnize($time_utils.zoneinfo_zones, 3), "", tostr("Type '", verb, " [timezone]' to set your time zone.")})
9:  endif
10: if (x = listassoc($time_utils.timezone_aliases, argstr))
11:   player:tell(x[1], " is an alias for ", x[2], ".")
12:   argstr = x[2]
13: endif
14: if (!(argstr in $time_utils.zoneinfo_zones))
15:   return player:tell("That's not a valid time zone.  Type '", verb, " list' to get a list of all valid time zones.")
16: endif
17: "Ensure proper capitalization."
18: argstr = $time_utils.zoneinfo_zones[argstr in $time_utils.zoneinfo_zones]
19: this.timezone_spec = argstr
20: player:tell("Your new time zone is ", this.timezone_spec, " (", this:ctime(), ").")
21: "Last modified by Dax (#789) on Sat Feb 22 12:35:53 2003 MST."

Verb arguments: any any any
Verb perms: Readable NOT-Debug
Verb owned by: Lao-Tzu (#8084)

You are not logged in.

[home | help | who | search | setup | code]