1 /*-------------------------------------------------------------------------
4 * Timezone Library Integration Functions
6 * Portions Copyright (c) 1996-2003, PostgreSQL Global Development Group
9 * $PostgreSQL: pgsql/src/timezone/pgtz.c,v 1.6 2004/05/01 22:07:03 momjian Exp $
11 *-------------------------------------------------------------------------
18 static char tzdir[MAXPGPATH];
19 static int done_tzdir = 0;
29 StrNCpy(tzdir, PGDATADIR, MAXPGPATH);
31 if (GetModuleFileName(NULL, tzdir, MAXPGPATH) == 0)
35 canonicalize_path(tzdir);
37 /* trim off binary name, then go up a directory */
38 if ((p = last_path_separator(tzdir)) == NULL)
42 strcat(tzdir, "/../share/timezone");
44 strcat(tzdir, "/timezone");