[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Gnumed-devel] Date of birth default times all seem to be 11:11
From: |
Karsten Hilbert |
Subject: |
Re: [Gnumed-devel] Date of birth default times all seem to be 11:11 |
Date: |
Fri, 15 Jul 2011 13:44:27 +0200 |
User-agent: |
Mutt/1.5.21 (2010-09-15) |
On Thu, Jul 14, 2011 at 06:53:47PM -0700, Jim Busser wrote:
> All of my boostrapped (Kirk) -- as well as all post-bootstrap dates of birth
> which I newly create -- display (in the client)
>
>
> 'year-mm-dd' followed by '11:11'
>
> What accounts for this always-11:11? With psql I did and got
>
> gnumed_v15=> show timezone;
> TimeZone
> ----------------
> Canada/Pacific
> (1 row)
>
> gnumed_v15=> select now();
> now
> -------------------------------
> 2011-07-14 18:47:46.928745-07
> (1 row)
>
>
> gnumed_v15=> select dob from dem.identity;
> dob
> ----------------------------
> 1953-12-18 12:11:11.111-08
...
This is a legacy aspect that I am SLOWLY migrating into a
saner solution.
DOB used to be a timestamp with time zone.
Most of the time no one actually documented the time of
birth. Thus it was typically set to 0:00:00 at the local
time zone. When saving to the backend it sometimes got
converted to UTC and back to the local time zone (see the
*12*:11:11 rather than 11:11:11 above) thereby moving back
the DOB by one day. To counter this effect we started
forcing the time part to 11:11:11.111 (which is fairly
unlikely to cross day boundaries by time zone changes. The
time part is now stored in .tob (time of birth). The .dob is
still a timestamp with time zone but will in due course be
changed to date-only. I am moving *very* cautiously here on
this rather fundamental aspect.
Karsten
--
GPG key ID E4071346 @ gpg-keyserver.de
E167 67FD A291 2BEA 73BD 4537 78B9 A9F9 E407 1346