[phobos] datetime review

Michel Fortin michel.fortin at michelf.com
Sat Oct 9 04:16:59 PDT 2010


Le 2010-10-09 à 1:47, Jonathan M Davis a écrit :

> Which is why PosixTimeZone and WindowsTimeZone will be getting that information 
> from the OS, but the OS does not make it easy. On Posix, you have to actually 
> read in the time zone files from disk, and on Windows, you have to read the 
> registry. No system calls are provided to properly deal with time zones. 
> Honestly, time zone support for anything other than the local time zone is very 
> poor on both Posix and Windows systems. And Windows won't even let you set the 
> time zone for your program without setting for the whole OS. It's not a pleasant 
> situation really, but I hope to be able to overcome it well enough that D 
> programmers won't have to worry about it.

I had the "pleasure" to work with time zones on Windows once, what a mess!

On OSX, Cocoa has an API for that, but you can probably get it the posix way too.

-- 
Michel Fortin
michel.fortin at michelf.com
http://michelf.com/





More information about the phobos mailing list