[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Gnumed-devel] Default datetime precision
From: |
Karsten Hilbert |
Subject: |
Re: [Gnumed-devel] Default datetime precision |
Date: |
Sun, 25 Aug 2013 21:03:23 +0200 |
User-agent: |
Mutt/1.5.21 (2010-09-15) |
On Sun, Aug 25, 2013 at 03:39:18PM +0000, Jim Busser wrote:
> >> At the creation of an encounter, it is sane that GNUmed offers by default,
> >> and saves, either
> >>
> >> now()
> >>
> >> or maybe even better
> >>
> >> date_trunc('minute', now())
> >
> > There is no choice in that. All date/time related fields in
> > the database are declared "timestamp with time zone" thusly
> > storing full precision down to the microsecond. If they
> > weren't they COULD NOT store the time which is undesirable.
>
> I would have thought that
>
> date_trunc('minute', now())
>
> which is
>
> 2013-08-25 08:35:00-08:00
>
> and which contains full precision, down to zero seconds, qualifies as
> "timestamp with time zone".
>
> It is merely that the seconds have been "zeroed out".
True enough, date_trunc() returns a timestamptz zeroed out.
Karsten
--
GPG key ID E4071346 @ gpg-keyserver.de
E167 67FD A291 2BEA 73BD 4537 78B9 A9F9 E407 1346