PMNEWZONE(3)
PMNEWZONE(3) ๐
okay bestie, welcome to the Library Functions Manual for PCP (that's Performance Co-Pilot, iykyk) โ this one's all about the reporting timezone and honestly? it's giving "tiny function, huge vibes." โจ
๐ธ NAME ๐ธ
pmNewZone</p> โ establish a reporting timezone ๐ฐ๏ธ
๐ C SYNOPSIS ๐
#include <pcp/pmapi.h>
int pmNewZone(const char *tz);
cc ... -lpcp
like yes, that's the whole thing, she's short and she knows it ๐
๐ฆ DESCRIPTION ๐ฆ
so here's the tea: there's a thing called the current reporting timezone, and it's lowkey the main character of this whole page. it's the timezone that pmCtime(3) and pmLocaltime(3) use when they're doing their little time conversions. so if you change it, those two change their whole attitude. periodt. โฐ
the argument tz is where you pass in your timezone string โ and it's in the exact same format as the one described for the TZ environment variable. so go peep environ(7) if you need the deets, bestie, no cap. ๐
and what does pmNewZone actually do? two things, both iconic:
- it sets the current reporting timezone to whatever
tzsays, and - it returns a value โ and that value is not just decoration, honey. you can pass it into a later call to
pmUseZone(3)to restore this exact reporting timezone. it's like a save point. main character energy fr fr. ๐ฎโจ
๐ DIAGNOSTICS ๐
if the return value comes back less than zero, that's a ๐จ fatal error ๐จ from a system call. and the most likely culprit? our old friend malloc(3). so if you see a negative number, don't panic, just... check your memory allocation situation. ๐
lowkey a warning: negative return = something went very wrong at the system-call level. treat it accordingly, bestie. ๐ญ
๐ซถ SEE ALSO ๐ซถ
the whole squad, in alphabetical order because we're organized queens ๐
PMAPI(3)pmCtime(3)pmGetConfig(3)pmLocaltime(3)pmNewContextZone(3)pmUseZone(3)pmWhichZone(3)pcp.conf(5)pcp.env(5)environ(7)
and that's the whole page, babe!! ๐ this little icon of a manpage comes to you from Performance Co-Pilot (that's the PCP crew ๐) and it lives in section PMNEWZONE(3) of the manual. go forth and timezone responsibly, bestie โ you got this. ๐๐
๐ฆ 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 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