List Info

Thread: Re: BR 774131: date and time macros




Re: BR 774131: date and time macros
user name
2008-02-16 17:16:27
> If the underlying platform doesn't provide UTC time,
these macros are undefined.

On a platform that doesn't support anything but local time,
the CRT might report the same time for localtime() as well
as gmtime(), in which case the UTC macros will exist, and
(most likely) not present UTC, no?

(In retrospect I think that __DATE__ and __TIME__ would
have been better off handled by the build environment, i.e.
a Makefile invoking e.g. date with the right format arg,
and
then handing the result to nasm via -D. Oh well.)

------------------------------------------------------------
-------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
Nasm-devel mailing list
Nasm-devellists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nasm-devel

Re: BR 774131: date and time macros
user name
2008-02-16 17:32:22
anonymous coward wrote:
>> If the underlying platform doesn't provide UTC
time, these macros are undefined.
> 
> On a platform that doesn't support anything but local
time,
> the CRT might report the same time for localtime() as
well
> as gmtime(), in which case the UTC macros will exist,
and
> (most likely) not present UTC, no?
> 

That's correct.  That's a platform issue, not really any
different than 
the fact that the clock can be set incorrectly by the
platform.

> (In retrospect I think that __DATE__ and __TIME__
would
> have been better off handled by the build environment,
i.e.
> a Makefile invoking e.g. date with the right format
arg, and
> then handing the result to nasm via -D. Oh well.)

Well, perhaps, except that in some environments that's
actually rather 
hard to do, and it's easy in C, without going beyond the
scope of C90 
(never mind C99).

	-hpa

------------------------------------------------------------
-------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
Nasm-devel mailing list
Nasm-devellists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nasm-devel

[1-2]

about | contact  Other archives ( Real Estate discussion Medical topics )