pmnewzone(3) - Linux man page

Name

pmNewZone - establish a reporting timezone

C Synopsis

#include <pcp/pmapi.h>

int pmNewZone(const char *tz);

cc ... -lpcp

Description

The current reporting timezone affects the timezone used by pmctime(3) and pmlocaltime(3).

The argument tz defines a timezone string, in the format described for the TZ environment variable, see environ(5).

pmNewZone sets the current reporting timezone, and returns a value that may be used in a subsequent call to pmusezone(3) to restore this reporting timezone.

See Also

pmapi(3), pmctime(3), pmgetconfig(3), pmlocaltime(3), pmnewcontextzone(3), pmusezone(3), pmwhichzone(3), pcp.conf(4), pcp.env(4) and environ(5).

Diagnostics

A return value less than zero indicates a fatal error from a system call, most likely malloc(3C).

Referenced By

__pmconverttime(3), __pmparsetime(3), pmmktime(3), pmparsetimewindow(3)