'\"macro stdmacro .\" .\" Copyright (c) 2000 Silicon Graphics, Inc. All Rights Reserved. .\" .\" 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 PMLOCALTIME 3 "PCP" "Performance Co-Pilot" .SH NAME \f3pmLocaltime\f1 \- convert the date and time for a reporting timezone .SH "C SYNOPSIS" .ft 3 #include .br #include .sp struct tm *pmLocaltime(const time_t *\fIclock\fP, struct tm *\fIresult\fP); .sp cc ... \-lpcp .ft 1 .SH DESCRIPTION .B pmLocaltime is very similar to .BR localtime (3), except the timezone used is the current ``reporting timezone'' (rather than the default .B TZ environment variable scheme), and the result is returned into a caller-declared buffer (rather than a private buffer). .PP Like .BR localtime (3) the time to be converted is passed via .IR clock , and the .I result contains the components broken out in the elements of the .I tm struct. .PP .B pmLocaltime returns .I result as the value of the function. .PP The default current reporting timezone is as defined by the .B TZ environment variable, so .B pmLocaltime and .BR localtime (3) will initially produce a similar encoding of the date and time. .PP Use .BR pmNewZone (3), .BR pmNewContextZone (3) or .BR pmUseZone (3) to establish a new current reporting timezone that will affect .B pmLocaltime but not .BR localtime (3). .SH SEE ALSO .BR localtime (3), .BR PMAPI (3), .BR pmCtime (3), .BR pmGetConfig (3), .BR pmNewContextZone (3), .BR pmNewZone (3), .BR pmUseZone (3), .BR pcp.conf (5) and .BR pcp.env (5).