1PMPARSECTIME(3)            Library Functions Manual            PMPARSECTIME(3)
2
3
4

NAME

6       __pmParseCtime - convert ctime(3) string to tm structure
7

C SYNOPSIS

9       #include <pcp/pmapi.h>
10       #include <pcp/impl.h>
11
12       int __pmParseCtime(const char *string, struct tm *rslt, char **errmsg)
13
14       cc ... -lpcp
15

DESCRIPTION

17       __pmParseCtime  reverses the asctime(3C) function.  It accepts a string
18       specifying a time, and fills in the given tm structure.
19
20       Either a fully specified asctime(3C) string like "Mon Mar   4  13:07:47
21       1996"  or  a  partially  specified time like '1996", "Mar 1996", "Mar 4
22       1996", "Mar", "13:07:47", "13:07", "Mar 4  13:07:47",...  is  accepted.
23       In  addition, the seconds component may be a floating point number, for
24       example "13:07:47.5".  The 12 hour clock is also supported, so  "13:07"
25       and "1:07 pm" are equivalent.
26
27       __pmParseCtime  returns  0  if successful.  It returns -1 and a dynami‐
28       cally allocated error message string in errmsg,  if  the  given  string
29       does not parse.  Be sure to free(3C) the error message string.
30
31       The tm structure returned in rslt should only be used as an argument to
32       the __pmConvertTime function, as it contains encoded  information  that
33       will only be correctly interpreted by __pmConvertTime.
34

SEE ALSO

36       PMAPI(3), pmParseInterval(3), __pmConvertTime(3) and __pmParseTime(3).
37
38
39
40Performance Co-Pilot                  SGI                      PMPARSECTIME(3)
Impressum