[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Re: Date DND



On Sun, Jul 20, 2003 at 12:00:09PM -0400, xdg-list-request freedesktop org was heard to remark:
> Subject: Re: date DND
> 
> On Sat, 2003-07-19 at 22:12, Matthias Clasen wrote:
> > 2) Is the proposed format good enough, or should we optionally include
> > time information ?

DND for time would be nice, and even for time interval.

(I hack on gnotime (gttr.sourceforge.net) so am sensitive to this).

> I am clueless on these things, but how about the unix time stamp string?
> That includes the exact time, and one could use it as "time" or "date"
> depending on the application..?

'seconds' is good, although there can be timezone issues. 

The ideal standard is ISO 8601 which solves the date and the time and
the timezone issues:

    For example: 1998-07-17 11:00:00.68-05
    is 680 milliseconds after 11 o'clock, central daylight time

What's nice is that this string is human readable too ...
It also sorts nicely during ascii sort.

--linas

If you need utility routines, I have the following inside of gnucash:

/** The gnc_iso8601_to_timespec_local() routine converts an ISO-8601 style
 *    date/time string to Timespec.
 *    For example: 1998-07-17 11:00:00.68-05
 *    is 680 milliseconds after 11 o'clock, central daylight time
 *    \return The time in local time.*/
Timespec gnc_iso8601_to_timespec_local(const char *);
 
/** The gnc_iso8601_to_timespec_gmt() routine converts an ISO-8601 style
 *    date/time string to Timespec.
 *    For example: 1998-07-17 11:00:00.68-05
 *    is 680 milliseconds after 11 o'clock, central daylight time
 *    \return The time in gmt. */
Timespec gnc_iso8601_to_timespec_gmt(const char *);
 

-- 
pub  1024D/01045933 2001-02-01 Linas Vepstas (Labas!) <linas linas org>
PGP Key fingerprint = 8305 2521 6000 0B5E 8984  3F54 64A9 9A82 0104 5933




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]