PMWHICHZONE(3)
β¨ pmWhichZone β return current reporting timezone β¨
okay bestie, gather round, because this is a tiny little function from the Performance Co-Pilot library manual (that's section 3, the "Library Functions Manual" one π) and she is small but mighty. her whole job? telling you which timezone is currently the reporting timezone. that's it. that's the girl. π
πΈ NAME πΈ
pmWhichZone β return current reporting timezone
no cap, that's the entire elevator pitch. πβ¨
π¦ C SYNOPSIS π¦
like, here's how you slide into her DMs:
#include <pcp/pmapi.h>
int pmWhichZone(char **tz);
cc ... -lpcp
the <pcp/pmapi.h> include is non-negotiable, and yeah you gotta link against -lpcp when you compile, that's just the vibe. π«Ά
π DESCRIPTION π
so. the current reporting timezone is a whole thing β it's the timezone that pmCtime(3) and pmLocaltime(3) are gonna use when they do their little time conversions. so if you've ever been like "why is my timestamp in that zone??" ... yeah. it's this. it's giving ambient global state, and honestly we respect it. π
pmWhichZone returns the handle of the current timezone β the one that was already established earlier by a call to pmNewZone(3) or pmNewContextZone(3). she doesn't set anything, she just reports. she's the friend who tells you where the group chat decided to eat. π
here's the tea on success: if the call works (meaning: a current reporting timezone actually exists, bestie), then:
- a non-negative integer gets returned, slay β
- and
tzgets set to point to a static buffer containing the timezone string itself π₯
heads up: that buffer is static, okay? it's not yours to free, it's not yours to scribble on. it's the function's little home. treat it like a museum exhibit. πΌοΈβ¨
π DIAGNOSTICS π
if the return value comes back less than zero, that means there is no current reporting timezone. like, nothing. empty. the void. π no timezone has been established, so there's nothing to report, and honestly? relatable.
π SEE ALSO π
go read these next, they're all part of the same friend group:
π§ a lil sign-off π§
this page came to you from the Performance Co-Pilot library, tagged PCP, filed under PMWHICHZONE(3). go forth, know your timezone, be the main character of your own timestamp. ππβ
periodt. π π
π¦ where this page comes from
- arch rolling: pcp 7.2.2-2 Β· GPL-2.0-or-later AND LGPL-2.1-or-later AND CC-BY-3.0
- centos-stream 10: pcp-doc 7.1.5-6.el10 Β· GPL-2.0-or-later AND CC-BY-3.0
- fedora 43: pcp-doc 7.0.1-1.fc43 Β· GPL-2.0-or-later AND CC-BY-3.0
- fedora 43: pcp-doc 7.2.1-1.fc43
- fedora 43: pcp-doc 7.2.2-1.fc43
- fedora 43: pcp-doc 7.2.2-2.fc43 Β· GPL-2.0-or-later AND CC-BY-3.0
- fedora 44: pcp-doc 7.1.0-6.fc44 Β· GPL-2.0-or-later AND CC-BY-3.0
- fedora 44: pcp-doc 7.2.1-1.fc44
- fedora 44: pcp-doc 7.2.2-1.fc44
- fedora 44: pcp-doc 7.2.2-2.fc44 Β· GPL-2.0-or-later AND CC-BY-3.0
- ubuntu resolute: libpcp4-dev 7.1.1-1
- ubuntu stonking: libpcp4-dev 7.2.1-2build1
- Copyright (c) 2000-2004 Silicon Graphics, Inc. All Rights Reserved
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms