datetime review part 2 [Update 4]

Jonathan M Davis jmdavisProg at gmx.com
Wed Nov 17 19:00:08 PST 2010


On Wednesday 17 November 2010 16:09:22 Todd VanderVeen wrote:
> The article was written in 2004. A high precision event timer has been
> incorporated in chipsets since 2005.
> 
> http://en.wikipedia.org/wiki/High_Precision_Event_Timer
> 
> I hope were not basing decisions on support for NT4.0 :)

I'm sure not. I believe that most or all of the Windows system calls that are 
made in std.datetime date back to Win2k. WindowsTimeZone could be improved if I 
could assume that Windows was Vista or newer, but that's obviously not 
reasonable at this point, so I used the Win2k functions for getting time zone 
information (the main difference being that the new ones can get correct DST info 
for historical dates whereas the old ones only ever use the current DST rules). 
I believe that the general philosophy is to support the oldest Windows OS that 
is reasonable (so, for example, if you can do it one way and support back to 
Win98 and another way which would support to Win2K and they're pretty much equal 
as far as utility or complexity goes, then choose the Win98 way). I don't know 
what the upper limit is though. XP obviously has to be supported, so anything 
newer than that is automatically out, but I don't know if a system function 
which was added in XP would be okay or not. Regardless, std.datetime assumes 
that your version of Windows is at least Win2k but does not assume that it's 
newer than that.

- Jonathan M Davis


More information about the Digitalmars-d mailing list