Add the following functions to datetime.e module:
- local_to_utc( datetime x, object tz=CURRENT_TMZ)
- utc_to_local( datetime x, object tz=CURRENT_TMZ)
- get_timezone()
local_to_utc
This takes a datetime x which represents a local time and returns the same time converted to Coordinated Universal Time - (the old GMT). It optionally takes a time zone difference for the local time. If this is omitted, the timezone set by the operating system is used.
utc_to_local
This takes a datetime x which represents the UTC time and returns the same time converted to a local time. It optionally takes a time zone difference for the local time. If this is omitted, the timezone set by the operating system is used.
get_timezone
This returns the number of hours (an atom) difference between the computer's clock and UTC.
I've also noticed many useful local routines that could be made public with the addition of some documentation.