---
name: "pmwhichzone"
section: "3"
platform: "linux"
package: "libpcp3-dev"
version: "4.3.2+really4.3.1-0.1"
release: "Debian 10 (Buster)"
platforms: ["linux"]
url: "https://carta.tech/man/pmWhichZone"
---

# pmwhichzone(3)

return current reporting timezone

Part of [pmWhichZone(3)](/man/pmWhichZone/3.md).

## NAME

**pmWhichZone** - return current reporting timezone

## C SYNOPSIS

**#include \<pcp/pmapi.h\>**

**int pmWhichZone(char \*\****tz***);**

**cc ... -lpcp**

## DESCRIPTION

The current reporting timezone effects the timezone used by [**pmCtime**(3)](/man/pmCtime/3.md) and [**pmLocaltime**(3)](/man/pmLocaltime/3.md).

**pmWhichZone** returns the handle of the current timezone, as previously established by a call to [**pmNewZone**(3)](/man/pmNewZone/3.md) or [**pmNewContextZone**(3)](/man/pmNewContextZone/3.md). If the call is successful (i.e. there exists a current reporting timezone) then a non-negative integer is returned and *tz* is set to point to a static buffer containing the timezone string itself.

## SEE ALSO

[**PMAPI**(3)](/man/PMAPI/3.md), [**pmCtime**(3)](/man/pmCtime/3.md), [**pmLocaltime**(3)](/man/pmLocaltime/3.md), [**pmNewContextZone**(3)](/man/pmNewContextZone/3.md), [**pmNewZone**(3)](/man/pmNewZone/3.md) and [**pmUseZone**(3)](/man/pmUseZone/3.md).

## DIAGNOSTICS

A return value less than zero indicates there is no current reporting timezone.
