now() -> now_to_tz

Ulf Wiger etxuwig@REDACTED
Fri Feb 28 10:11:25 CET 2003


On Thu, 27 Feb 2003, Per Hedeland wrote:

>The general problem of time zone conversions is actually
>ridiculously complex, which is why there is a complete
>"database" for it, implemented on all modern Unices (and
>probably on Windows too, more or less), as well as a
>mailing list - [...]

It is indeed complex. To make matters worse, the rules keep
changing (in some countries, for example, the parliament
decides when to switch to/from DST, and the U.S. has AFAIR
different rules depending on whether or not it's a
Presidential election year.)

In AXD 301, we decided to provide a web page where the
operator can define the information necessary whatever
timezone [s]he wants the switch to be in. We then use
os:setenv("TZ",...) to get correct localtime in the Erlang
VM. The rest of the system is always set for UTC. It's
worked for us so far.

/Uffe
-- 
Ulf Wiger, Senior Specialist,
   / / /   Architecture & Design of Carrier-Class Software
  / / /    Strategic Product & System Management
 / / /     Ericsson AB, Connectivity and Control Nodes




More information about the erlang-questions mailing list