---
name: "pmWhichZone"
section: "3"
platform: "linux"
package: "pcp"
version: "7.2.2-2"
release: "Arch Linux 2026-11-01"
platforms: ["linux"]
url: "https://new.carta.tech/pmWhichZone"
---

# pmWhichZone(3)

return current reporting timezone

## 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)](/pmCtime/3.md) and [**pmLocaltime**(3)](/pmLocaltime/3.md).

**pmWhichZone** returns the handle of the current timezone, as previously established by a call to [**pmNewZone**(3)](/pmNewZone/3.md) or [**pmNewContextZone**(3)](/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.

## DIAGNOSTICS

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

## SEE ALSO

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