[Ur] Accessing time components
Adam Chlipala
adamc at impredicative.com
Sun May 15 10:00:32 EDT 2011
Gian Perrone wrote:
> As a follow-up question, in that case, does there exist any way of
> accessing the individual fields of the 'broken-down' time representation
> of the 'tm' struct? That is, are concepts like seconds, minutes, hours,
> days etc. exposed anywhere?
>
The [time] type is represented in the standard UNIX way, so that it's
time zone independent, which means that no unique 'struct tm' is defined
for a time. The only piece of the standard library for extracting
standard human-readable components is [timef], which uses the local time
zone. It seems reasonable to me to add a [timefUtc], if you think it
would be useful. Also reasonable might be some system of getting time
components as numbers rather than strings.
More information about the Ur
mailing list