On Tuesday, September 06, 2011 04:40:05 Jonathan M Davis wrote: > On Tuesday, September 06, 2011 15:31:26 Dmitry Olshansky wrote: > > On 06.09.2011 7:36, Daniel Murphy wrote: > > > The pull-request auto-tester is now available for druntime and > > > phobos, > > > as well as dmd. > > > > > > http://yebblies.com/results/ > > > > Looks like there is a problem with Phobos datetime on test machine, off > > by 1 hour - DST problem? > > I'm working on it. It's a combination of an actual bug surrounding DST > changes and the fact that you can't actually test that SysTime(dateTime) is > going to be equal to dateTime during a DST change, because the OS is > inconsistent between time zones on what it does when the requested time is > during a DST switch (or even within an hour or two of it in some cases). > Any time that you try and set a property of a SysTime, if that property > would put it during a DST switch, there are going to be issues, and as far > as I can tell, there is no way to get rid of them all. It's quite > disgusting really. Adding or subtracting from a time is fine, and because > SysTime holds its time internally in UTC, it avoids quite a few problems, > but anytime that you have to convert it to its time zone and back again (as > must be done when setting its properties), there are issues around DST. I > could make it work if the OS were actually consistent, but on Linux at > least, it isn't. Bleh. > > In any case. You don't want to hear/read me ranting about it. I'll have a > solution fairly soon, but I think that there's always going to be a risk of > the std.datetime unit tests failing in some time zone or other just because > one of the times tested happens to fall on one of that time zone's DST > switches.
Okay. By who knows how many miracles, I finally figure out how to make the time around DST switches completely consistent on Posix, and I believe that I have all of the DST issues on Posix sorted out. However, I haven't look at what's going on on Windows yet (it may or may not be broken). Once I've sorted that out, I'll create a pull request with the appropriate fixes - hopefully sooner rather than later, but we'll have to see. - Jonathan M Davis _______________________________________________ phobos mailing list [email protected] http://lists.puremagic.com/mailman/listinfo/phobos
