GSP
Quick Navigator

Search Site

Unix VPS
A - Starter
B - Basic
C - Preferred
D - Commercial
MPS - Dedicated
Previous VPSs
* Sign Up! *

Support
Contact Us
Online Help
Handbooks
Domain Status
Man Pages

FAQ
Virtual Servers
Pricing
Billing
Technical

Network
Facilities
Connectivity
Topology Map

Miscellaneous
Server Agreement
Year 2038
Credits
 

USA Flag

 

 

Man Pages


Manual Reference Pages  -  PQLOCALTZINFO (3)

NAME

PQlocalTZInfo - Gets the local machine's timezone information.

CONTENTS

Synopsis
Description
Return Value
Examples
Rationale
Author
Reporting Bugs
Copyright
See Also

SYNOPSIS

#include <libpqtypes.h>

void PQlocalTZInfo(time_t *t, int *gmtoff, int *isdst, char **tzabbrp);

DESCRIPTION

This function retrieves the local machine's timezone information.

If the t argument is not NULL, it represents a time_t value to get timezone information for. If it is NULL, the current time is used.

The gmtoff argument will be pointed at the number of seconds from GMT, same value as the GNU (struct tm).tm_gmtoff extension.

The isdst argument will be pointed at zero if in standard time, one if in daylight savings time and negative one if unknown.

The tzabbrp argument will be pointed at the timezone abbreviation, like PST, ADT, EST, etc..

RETURN VALUE

None.

EXAMPLES

This example gets the local timezone information for a file's modified time.

int gmtoff;
int isdst;
char *tzabbr;
struct stat st;

stat("report.xml", &st); PQlocalTZInfo(&st.st_mtime, &gmtoff, &isdst, &tzabbr);

RATIONALE

libpqtypes needs the ability to get the local machine's timezone information for the datetime data types. It later became apparent that a portable way of getting timezone information was very useful and in demand. Thus, this function was made public.

AUTHOR

A contribution of eSilo, LLC. for the PostgreSQL Database Management System. Written by Andrew Chernow and Merlin Moncure.

REPORTING BUGS

Report bugs to <libpqtypes@esilo.com>.

COPYRIGHT

Copyright (c) 2011 eSilo, LLC. All rights reserved.
This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

SEE ALSO

pqt-specs(3)

Search for    or go to Top of page |  Section 3 |  Main Index


libpqtypes PQLOCALTZINFO (3) 2011

Powered by GSP Visit the GSP FreeBSD Man Page Interface.
Output converted with manServer 1.07.