I think the idea behind this difference in behavior is that a question should become unanswerable as soon as the user is made aware that it's been closed, and no sooner than that. If a user agent doesn't or cannot receive a client-side notification that the question was closed as soon as it happens then it seems unreasonable to let the user finish their answer none the wiser and block them only when they finally hit submit (sure, they could refresh the page before hitting submit, but I don't like to play that "workaround" game anymore). It's disrespectful of their time, and a poor user experience in general. However once a client is notified this feedback is passed on to the user to let them know not to waste further time attempting to answer the question.
Now, the premise of that last sentence is what I disagree with. Typically, it's true that questions that get closed shouldn't be answered to begin with — assuming they're off-topic and should be closed in the first place. But what if they were on-topic and shouldn't have been closed? Now you have to go through the entire close-reopen cycle, delaying an answer that was already in progress since before the question was closed. And if you're not a diamond mod or if the dupehammer doesn't apply, you can't get the question reopened alone, which means a potentially long and potentially indefinite wait for this process to complete. This whole reopening song and dance is an issue of its own, though, that I've complained about before, regardless of whether or not someone was already writing an answer as close votes accumulate.
Rather than having to do something shady such as exploiting client-server differences I'd like to see a policy that's enforced consistently. My wishful thinking is that users are just given a generous grace period to finish answering questions they started working on before they were closed, out of respect for their time and effort regardless of the question's status. But even aside from cases where people shouldn't have started answering questions in the first place because they are off-topic, this would also cause people who pay attention to timestamps (like me, hoho) to start asking on meta how answers were posted after a question was closed. There doesn't seem to be a way around this that would make sense to, and please, everybody.
Just my thoughts on this in long form, I don't really have an official answer. That said, if you were to ask me what I'd do with an answer that gets posted this way, I'd probably just leave it alone unless the question is blatantly off-topic and the answer doesn't need to exist. If I spotted this happening I'd go straight to the question and handle it accordingly. But I can only do that because I'm a moderator.
DATEDIFF
returns the number of actual hours that have passed, where as it actually returns the number of "ticks". So, for example,DATEDIFF(HOUR,'10:59:59.500','11:00:00.000')
would return1
even though only half a second has passed, as the hour value has incremented by 1. Like wiseDATEDIFF(YEAR, '20101231','20200101')
would return 10, even though really 9 years and a day has passed (a common error users make when thinking they are calculating someone's DoB).