For this topic's original documentation, see the TIM Variable - Get Time of Day.
By default, the TIM variable returns the current server time.
In BBj 12.0 and higher, when using a thin client connection, this can be changed to return the current client time by setting SETOPTS byte 8, bit $08$. Use TIM(MODE="SERVER") or TIM(MODE="CLIENT") to explicitly return either server or client time, independent of the value of the SETOPTS bit.
In BBj 14.0 and higher, the MODE="CLIENT" option is also supported with TermConsole connections. In this configuration, the client time zone is set by the value of the TZ environment variable at the time when the TermConsole session was started.
The BBj TIM variable is accurate to the nearest millisecond, if supported by the host operating system. Because the PRO/5 TIM variable is only accurate to the nearest second, some legacy BBx applications assume that TIM*3600 is guaranteed to evaluate to an integer. This assumption is not valid in BBj.