According to Gabriele Bartolini:
> The only information stored is a time_t. But I also intend to put a static
> struct tm object in order to permit temporary data transports such as:
> 
> struct tm * GetStructTm(time_t);
> 
> I have recognized 4 ways to introduce a date:
> 
> - from a char * or string (such as RFC 1123, asctime, etc ...)
> - from a series of ints such as
> 
>       void SetDate (int yy, int mm, int dd, int hh, int min, int sec)
> 
> - from a time_t value (both & and *), similar to the copy method
> - from a struct tm value (both & and *), similar to the copy method, by
> invoking the mktime function.
> 
> Can you see any more ways?

One of the string formats you'd need to handle is ISO-8601, with or
without the time string after the date string.  In the absence of a time
string, the code would have to pick a reasonable default, or allow the
specification of one.  The same default may not necessarily be appropriate
in all circumstances.

The other consideration is timezones.  The time_t values are always in
UTC, but the other formats may be in UTC or in the local time zone, so
when you convert between time_t and the other formats, you need to be
able to handle the timezone conversion too.  Dates from HTTP servers
are always strings in the UTC zone, but dates that htsearch outputs
(or inputs for the new time range search options) would tend to be in
the server's own local time zone.

-- 
Gilles R. Detillieux              E-mail: <[EMAIL PROTECTED]>
Spinal Cord Research Centre       WWW:    http://www.scrc.umanitoba.ca/~grdetil
Dept. Physiology, U. of Manitoba  Phone:  (204)789-3766
Winnipeg, MB  R3E 3J7  (Canada)   Fax:    (204)789-3930
------------------------------------
To unsubscribe from the htdig3-dev mailing list, send a message to
[EMAIL PROTECTED] containing the single word "unsubscribe" in
the SUBJECT of the message.

Reply via email to