Bug introduced in v11, fixed in v11.1

I have recently upgraded to Mathematica 11. Here is a simplified version of code that worked in v10.2:

mn = DateObject[
    DateValue[DateObject[], {"Year", "Month", "Day"}],
    TimeZone -> LocalTimeZone[]];

DateDifference[mn, mn]

The results is an error with the message:

  DateDifference::date: Expression {Gregorian,Thu 15 Dec 2016EST} cannot   
  be interpreted as a date specification.

In v10.2, the computed and expected result is 0 days.

I could not find any documentation that mentions a relevant change in DateDifference in v11.

My question is: am I missing anything? If not, how should I go about reporting this issue?

  • 4
    $\begingroup$ DateDifference[DateList@mn, DateList@mn]. But yeah, you shouldn't have to do that. $\endgroup$
    – KAI
    Dec 15 '16 at 17:48
  • 4
    $\begingroup$ Anyway, the problem is the LocalTimeZone[]. Note that if you change it to 0, the code works. $\endgroup$
    – KAI
    Dec 15 '16 at 17:52
  • $\begingroup$ Or use TimeZone -> $TimeZone $\endgroup$
    – Bob Hanlon
    Dec 23 '16 at 14:19

I have reported the situation as a bug to support@wolfram.com.

  • 1
    $\begingroup$ Please edit your answer if they reply to you. $\endgroup$
    – J. M.'s torpor
    Dec 23 '16 at 14:03

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.