On 2020-01-09, at 14:39:58, Paul Eggert <eggert@cs.ucla.edu> wrote:
On 1/9/20 6:15 AM, Andrew Lyon wrote:
if the hour of birth is unknown (for patients born 1930-41), that a birth hour of midnight is assigned as a default.
If the birth hour is unknown you might be better off defaulting to noon than to midnight. First, noon is likely closer to the actual birth hour.[1] Second, you'll avoid some of these software glitches.
Indeed. I don't know if this is relevant: https://pubs.opengroup.org/onlinepubs/9699919799/functions/mktime.html#tag_1... RETURN VALUE The mktime() function shall return the specified [local] time since the Epoch encoded as a value of type time_t. If the time since the Epoch cannot be represented, the function shall return the value (time_t)-1 [CX] and set errno to indicate the error. Does this refer to times during the spring-forward hour? Should mktime() then return the nearest boundary and set errno? There's an unfortunate design choice since time_t is generally regarded as signed (citation needed) and (time_t)-1 might represent 1969-12-31 23:59:59. The programmer must check errno. -- gil