From: "Randy Brukardt" <randy@rrsoftware.com>
Subject: Re: GNATCOLL SQLite3 vs Ada.Calendar.Time
Date: Thu, 18 Aug 2016 17:05:37 -0500
Date: 2016-08-18T17:05:37-05:00 [thread overview]
Message-ID: <np5bf8$6ls$1@franka.jacob-sparre.dk> (raw)
In-Reply-To: np53eg$1o71$1@gioia.aioe.org
"Dmitry A. Kazakov" <mailbox@dmitry-kazakov.de> wrote in message
news:np53eg$1o71$1@gioia.aioe.org...
...
> When storing timestamps into SQLite3 it is better to use TEXT and some
> custom time/string conversion that would guarantee proper ordering and
> precision.
For many purposes, the ISO-standard format used by Ada.Calendar.Formatting
is sufficient; the package includes conversions both ways. The ISO format
has a fixed size (so it works well with Ada strings), and it is formatted
such that normal string comparisons give an appropriate ordering.
The only reasons to use a custom format would be if one needed to use a
shorter format for some reason, or if one needs more precision than 1/100
seconds. Otherwise, sticking with the standard format allows using
language-defined routines available on all Ada 2005 and later compilers
(*much* less chance of making a conversion mistake).
Randy.
prev parent reply other threads:[~2016-08-18 22:05 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-08-17 21:05 GNATCOLL SQLite3 vs Ada.Calendar.Time Stephen Leake
2016-08-18 8:09 ` Dmitry A. Kazakov
2016-08-18 11:19 ` G.B.
2016-08-18 17:45 ` Stephen Leake
2016-08-18 18:13 ` Stephen Leake
2016-08-19 15:30 ` Stephen Leake
2016-08-19 17:43 ` G.B.
2016-08-18 18:28 ` Jeffrey R. Carter
2016-08-18 19:48 ` Dmitry A. Kazakov
2016-08-18 20:50 ` Jeffrey R. Carter
2016-08-18 22:05 ` Randy Brukardt [this message]
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox