[fpc-devel] NowUTC in the RTL
Tomas Hajny
XHajT03 at hajny.biz
Fri Dec 9 16:31:58 CET 2011
On Fri, December 9, 2011 16:04, Michael Van Canneyt wrote:
> On Fri, 9 Dec 2011, Jonas Maebe wrote:
>
>>>> it also solves the problem that some targets may not support returning
>>>> the
>>>> time in UTC.
>>>
>>> I think that Michael already exposed more then enough the holes in
>>> this argument.
>>
>> He did not expose any holes in any argument. He simply said that Go32v2
>> and
>> OS/2 can be ignored as far as any potential implementation problems are
>> concerned because Go32v2 and to a (much) lesser extent OS/2 do not
>> support
>> various features. I strongly disagree about the OS/2 part because its
>> target
>> support is still actively maintained, so the least courtesy we can do is
>> to
>> try to accomodate it rather than simply upfront state "if it doesn't
>> work for
>> your target, tough luck".
>
> Hola :-) I didn't say we should not accomodate it.
>
> I did say that *the decision* to introduce it should not depend on some
> specific
> older platforms not being able to support it, since this is true for other
> calls as
> well, and they were introduced nonetheless.
>
> If we decide to put it in, we should help Tomas finding an implementation
> method
> for OS/2. This is understood.
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.
Tomas
More information about the fpc-devel
mailing list