1PMLOCALTIME(3) Library Functions Manual PMLOCALTIME(3)
2
3
4
6 pmLocaltime - convert the date and time for a reporting timezone
7
9 #include <time.h>
10 #include <pcp/pmapi.h>
11
12 struct tm *pmLocaltime(const time_t *clock, struct tm *result)
13
14 cc ... -lpcp
15
17 pmLocaltime is very similar to localtime(3), except the timezone used
18 is the current ``reporting timezone'' (rather than the default TZ envi‐
19 ronment variable scheme), and the result is returned into a caller-
20 declared buffer (rather than a private buffer).
21
22 Like localtime(3) the time to be converted is passed via clock, and the
23 result contains the components broken out in the elements of the tm
24 struct.
25
26 pmLocaltime returns result as the value of the function.
27
28 The default current reporting timezone is as defined by the TZ environ‐
29 ment variable, so pmLocaltime and localtime(3) will initially produce a
30 similar encoding of the date and time.
31
32 Use pmNewZone(3), pmNewContextZone(3) or pmUseZone(3) to establish a
33 new current reporting timezone that will affect pmLocaltime but not
34 localtime(3).
35
37 localtime(3), PMAPI(3), pmCtime(3), pmGetConfig(3), pmNewCon‐
38 textZone(3), pmNewZone(3), pmUseZone(3), pcp.conf(4) and pcp.env(4).
39
40
41
42Performance Co-Pilot SGI PMLOCALTIME(3)