PMMKTIME(3)
π PMMKTIME(3) β Library Functions Manual π
okay bestie, we're deep in the PCP (Performance Co-Pilot) docs rn, this is page PMMKTIME(3), and it's giving β¨internal toolingβ¨ energy. stay with me, it's short and cute.
πΈ NAME πΈ
__pmMktime β convert a tm structure to a calendar time π°οΈ
β¨ C SYNOPSIS β¨
#include <time.h>
#include "pmapi.h"
#include "libpcp.h"
time_t __pmMktime(struct tm *timeptr);
cc ... -lpcp
like yes, you include all three headers, yes you link -lpcp, no we are not skipping any of it π
β οΈ CAVEAT β οΈ
fr fr, read this one before you get attached:
- this whole doc is meant for internal Performance Co-Pilot (PCP) developer use only, it's not for the general public, bestie π
- these interfaces are not part of the PCP APIs that are guaranteed to remain fixed across releases, and they may not work, or may provide different semantics, at some point in the future π
so like⦠no cap, this could change under you at any moment. don't build your whole personality on it.
π DESCRIPTION π
__pmMktime is basically mktime(3)'s twin, lowkey. Very similar, except the timezone it uses is the current reporting timezone β not the default TZ environment variable scheme. that's the whole plot twist π
and just like mktime(3):
- the time you want converted gets passed in via
timeptrπ«Ά - the function result holds the calendar time, aka the number of seconds since
00:00:00 UTC, January 1, 1970β³
the default current reporting timezone is whatever the TZ environment variable defines, so at first __pmMktime and mktime(3) will produce similar conversions. they start out matching, it's cute πΈ
then, when you want to switch it up, use pmNewZone(3), pmNewContextZone(3) or pmUseZone(3) to establish a new current reporting timezone. heads up though, that new zone will effect __pmMktime but not mktime(3). so they'll diverge, and that's on purpose, periodt π
π¦ SEE ALSO π¦
and that's the page, bestie!! this one came out of the Performance Co-Pilot world, tagged PCP, filed under PMMKTIME(3) π go read mktime(3) next if you want the normie version, ily, slay πβ¨
π¦ 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