AMAZON.DATE is really cool in concept—that the platform does all the work of figuring out dates for you no matter how the user says the date—but without taking local time into account, it seems to be completely broken.
Currently, it reports back the date in a variety of formats. The examples given online are: “today”: 2015-11-24 “tomorrow”: 2015-11-25 “november twenty-fifth”: 2015-11-25 “next monday”: 2015-11-30 “this week”: 2015-W48 “next week”: 2015-W49 “this weekend”: 2015-W48-WE “this month”: 2015-11 “next year”: 2016 “this decade”: 201X
Notice the mix of relative (today, tomorrow) and absolute (november twenty-fifth) dates.
But because it reports the date back based on UTC time (without giving the time), in the evening the date is off for my time zone if I am requesting a relative date.
Initially I thought this was solvable by simply taking time zone into account and adding/subtracting a day if warranted. However, there is no way of knowing if the user actually asked for an absolute date, in which that adjustment should NOT be made.
An example might be most clear:
Today is Friday, March 4.
If I ask Alexa tonight, in my US Time Zone, using the AMAZON.DATE slot type, for "today", it will report 2016-03-05.
I could code it to automatically subtract a day if it is evening in my time zone to account for this. (I'd have to make some assumptions about time zone or ask for it, but that's a separate issue.)
But if I ask her for the absolute "Saturday" it will also report 2016-03-05; and if my code automatically subtracts a day in the evening then that case will report the wrong date.
Am I missing something? I don't see a way around it. I can't believe that AMAZON.DATE with relative dates doesn't just automatically take local time zone into account—it seems like the only way this slot type would logically be used.