1PMCTIME(3) Library Functions Manual PMCTIME(3)
2
3
4
6 pmCtime - format the date and time for a reporting timezone
7
9 #include <time.h>
10 #include <pcp/pmapi.h>
11
12 char *pmCtime(const time_t *clock, char *buf);
13
14 cc ... -lpcp
15
17 pmCtime is very similar to ctime(3), except the timezone used is the
18 current ``reporting timezone'' (rather than the default TZ environment
19 variable scheme), and the result is returned into a caller-declared
20 buffer (rather than a private buffer).
21
22 Like ctime(3) the time to be converted is passed via clock, and the
23 result in buf is fixed width fields in the format:
24
25 Fri Sep 13 00:00:00 1986\n\0
26
27 The result buffer buf must be at least 26 bytes long, and no attempt is
28 made to check this. pmCtime returns buf as the value of the function.
29
30 The default current reporting timezone is as defined by the TZ environā
31 ment variable, so pmCtime and ctime(3) will initially produce similar
32 encoding of the date and time.
33
34 Use pmNewZone(3), pmNewContextZone(3) or pmUseZone(3) to establish a
35 new current reporting timezone that will effect pmCtime but not
36 ctime(3).
37
39 ctime(3), PMAPI(3), pmLocaltime(3), pmNewContextZone(3), pmNewZone(3)
40 and pmUseZone(3).
41
42
43
44Performance Co-Pilot PCP PMCTIME(3)