On Thu, 26 Jul 2007 04:28:35 -0700, Andy Townsend <[EMAIL PROTECTED]> wrote:
> Folks, > > Try this in CQ. > > Is this a buglet or an unexpected daylight saving quirk of 3.2 (and if so > in which timezone :-) > > Andy Ah, the joys of date-time arithmetic! When you have an xs:date (or other date/time type, for that matter) without an explicit timezone, the timezone is taken to be the "implicit timezone". In MarkLogic this is taken to be whatever the operating system says it is _for the date in question_. That last part means that dates that fall on different sides of daylight savings actually have different implicit timezones (one is, perhaps -08:00 and the other -07:00). Since date arithmetic is defined as an operation on a dateTime value (midnight of the date in question), you can get this one-hour different results when daylight savings enters into it. So, in fact, the 3.2 answers are the right ones. The fact that there are different implicit timezones for different dates in the same query may seem a little strange, but having different implicit timezones for different dateTimes in the same query actually produces answers that are closer to what people expect. So why does 3.1-4 not show this behaviour? Well, the short answer is we fixed a bug in timezone handling in 3.2. For some of the date/time functions, for certain values, the results could be REALLY out of whack (not just an hour wrong, as in your 3.1-4 example). Cheers //Mary Mary Holstege Lead Engineer Mark Logic Corporation 999 Skyway Drive Suite 200 San Carlos, California 94070 +1 650 655 2336 Phone [EMAIL PROTECTED] www.marklogic.com _______________________________________________ General mailing list [email protected] http://xqzone.com/mailman/listinfo/general
