News for hackers. Stuff that matters.
Re:UTC Is Enough for Everyone, Right? by senlutomchen on Tuesday May 29, 2018 @06:50PM (#17183462)
Another example of confusing user-intent is "last X days".

I.e Does "Last 2 days" indicate: A. Last 48 hours? B. Yesterday + Today up to now C. Yesterday + the day before.

Re:UTC Is Enough for Everyone, Right? by cryptonector on Tuesday May 29, 2018 @07:17PM (#17183593)
"One month from now" is horrible. Is that "30 days from now" or "same day number next month"? If the latter, then how do you handle a 31st when the next month has 30 days or fewer? (Or a 29th when the next month is February and this is not a leap year?)

This is a difficult subject.

Recurrence is especially tough to model in a database.

Re:UTC Is Enough for Everyone, Right? by narag on Wednesday May 30, 2018 @04:28AM (#17186036)
It depends on the context. I've programmed date logic for holiday calculation, days open for business and deadlines. I like working with dates because it's always well specified.
Re:UTC Is Enough for Everyone, Right? by wafflebear on Wednesday May 30, 2018 @07:33AM (#17186814)
How about adding the number of days in the current month?
Re:UTC Is Enough for Everyone, Right? by cryptonector on Wednesday May 30, 2018 @09:49AM (#17187592)
It depends on user intent.

Often the user means "same day of the week, four or five weeks from now".

Re:UTC Is Enough for Everyone, Right? by matt-tingen on Tuesday May 29, 2018 @07:57PM (#17183778)
Even something as simple as "tomorrow" can be ambiguous. I often ask my phone to set a reminder for tomorrow. If I'm asking after midnight, what I really mean is "today" since I haven't gone to sleep yet. Google seems to get this right, thankfully.
Re:UTC Is Enough for Everyone, Right? by daveFNbuck on Tuesday May 29, 2018 @10:53PM (#17184667)
> Google seems to get this right, thankfully.

Gets it right for you. If I mean today, I say today. This is especially true when I'm talking to a computer.

Re:UTC Is Enough for Everyone, Right? by mseebach on Wednesday May 30, 2018 @06:27AM (#17186503)
Both the words "today" and "tomorrow" ("morrow" being related to the word "morning") are defined in terms of the day, not whether it's before or after midnight. "Noon tomorrow" spoken at 23:55 or 0:05 refers to the same point in time (~12 hours later) in human language. I would argue that "today" is basically unassigned at night - there is no current day in scope.

Sometimes we need to use non-human language to communicate intent correctly to a computer, but we shouldn't let that redefine perfectly good and well established human language.

Re:UTC Is Enough for Everyone, Right? by daveFNbuck on Wednesday May 30, 2018 @12:08PM (#17188886)
This is how you use today and tomorrow. It's not universal to all human language or even to English speakers. Words have different meanings depending on lots of factors including context and region.

Your definition has the same issue that mine does, just with sunrise being the time around which the meaning of tomorrow is unclear. How high does the sun have to be before "today" becomes defined and the meaning of "noon tomorrow" shifts by 24 hours? If I wake up before sunrise, does tonight refer to now or to after the next sunset?

There's a certain amount of ambiguity inherent to the English language.

Re:UTC Is Enough for Everyone, Right? by mseebach on Wednesday May 30, 2018 @01:15PM (#17189518)
Yes, there's ambiguity, but there's no reason to introduce new ambiguity where none existed before by trying to reason about these words in terms of midnight (possibly for the benefit of computers), when that was never where these words were anchored. That was the point I was trying to make.
Re:UTC Is Enough for Everyone, Right? by daveFNbuck on Wednesday May 30, 2018 @10:58PM (#17193627)
I've always reasoned in terms of midnight because that's when the date changes. I use tomorrow to mean the next date and today to mean the current date. I'm not doing it for the sake of computers, that's just what I've always understood these words to mean.

I think using midnight as the anchor for the today/tomorrow distinction is a lot less confusing and ambiguous than having today/tomorrow not tied to the current date.

Re:UTC Is Enough for Everyone, Right? by MVorlm on Tuesday May 29, 2018 @09:31PM (#17184296)
IIRC Google uses 4am as the cuttoff. So saying "tomorrow" after that cuttoff will be the following calendar day.
Re:UTC Is Enough for Everyone, Right? by tjoff on Wednesday May 30, 2018 @06:45AM (#17186563)
Google also says that an event that took place 47 hours ago is "yesterday" which is hilariously bad.

Just print the date and time.

Re:UTC Is Enough for Everyone, Right? by Asooka on Wednesday May 30, 2018 @04:39AM (#17186077)
Tomorrow is tied to the morrow, so it isn't tomorrow until sunrise.
Re:UTC Is Enough for Everyone, Right? by scbrg on Wednesday May 30, 2018 @10:02AM (#17187689)
So in roughly 1200 hours then. Check.

/folks up north

Re:UTC Is Enough for Everyone, Right? by gmac on Wednesday May 30, 2018 @07:01AM (#17186630)
Seems like the only correct behaviour, really, would be to ask the user for clarification.