[fpc-devel] NowUTC in the RTL
Michael Van Canneyt
michael at freepascal.org
Fri Dec 9 16:44:19 CET 2011
On Fri, 9 Dec 2011, Tomas Hajny wrote:
>
> Thanks, but don't worry, I didn't take personally. ;-) I know the proper
> solution for both GO32v2 and OS/2 (and probably also other platforms not
> providing native support of timezone handling). As mentioned previously,
> this solution is based on parsing the TZ environment variable (see e.g.
> http://www.scribd.com/doc/70722660/37/The-TZ-Environment-Variable
> including the notes about the "alternative format used for OS/2" - and
> actually necessary for DOS / GO32v2 too).
>
> The only trouble (and reason of my original comment) is that the system
> doesn't enforce existence or validity of this environment variable - it's
> merely a user setting. If it doesn't exist, the implementation needs to
> assume that local time = UTC.
Well, As long as it is documented properly, I don't think there is anything
wrong with such an implementation.
Michael.
More information about the fpc-devel
mailing list