'\"macro stdmacro .\" .\" Copyright (c) 2010 Ken McDonell. All Rights Reserved. .\" Copyright (c) 2026 Red Hat. .\" .\" This program is free software; you can redistribute it and/or modify it .\" under the terms of the GNU General Public License as published by the .\" Free Software Foundation; either version 2 of the License, or (at your .\" option) any later version. .\" .\" This program is distributed in the hope that it will be useful, but .\" WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY .\" or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License .\" for more details. .\" .\" .TH PMISETTIMEZONE 3 "" "Performance Co-Pilot" .SH NAME \f3pmiSetTimezone\f1, \f3pmiSetZoneinfo\f1 \- set the source timezone for a LOGIMPORT archive .SH "C SYNOPSIS" .ft 3 .ad l .hy 0 #include .br #include .sp int pmiSetTimezone(const char *\fIvalue\fP); .br int pmiSetZoneinfo(const char *\fIvalue\fP); .sp cc ... \-lpcp_import \-lpcp .hy .ad .ft 1 .SH "Perl SYNOPSIS" .ft 3 .ad l .hy 0 use PCP::LogImport; .sp pmiSetTimezone($\fIvalue\fP); .hy .ad .ft 1 .SH "Python SYNOPSIS" .ft 3 .ad l .hy 0 from pcp import pmi .sp log.pmiSetTimezone(\fIvalue\fP) .hy .ad .ft 1 .SH DESCRIPTION As part of the Performance Co-Pilot Log Import API (see .BR LOGIMPORT (3)), .B pmiSetTimezone sets the POSIX timezone string in the current context to .IR value , which is stored in the archive label. In the absence of a call to .B pmiSetTimezone the source timezone defaults to the timezone of the localhost. .PP .B pmiSetZoneinfo sets the Olson (tzdata) timezone name for the archive, providing higher-fidelity timezone information than the POSIX string alone. If .I value is NULL, .B pmiSetZoneinfo auto-detects the Olson name for the current local timezone from the system timezone database; if no Olson name can be determined the call is a silent no-op. Passing an explicit Olson name such as .I "America/New_York" stores it directly without any lookup. The zoneinfo string is written into v3 archives alongside the POSIX timezone string. .SH DIAGNOSTICS Both functions return zero on success, or a negative value that can be turned into an error message by calling .BR pmiErrStr (3). .SH SEE ALSO .BR LOGIMPORT (3), .BR pmiErrStr (3), .BR pmiSetHostname (3), .BR pmiSetVersion (3) and .BR pmiStart (3).