From 14a183261a1f9b15dc73ad34295d118ada538b5b Mon Sep 17 00:00:00 2001 From: Tom Lane Date: Fri, 23 Sep 2011 21:42:24 -0400 Subject: [PATCH] Update win32tzlist.pl for the new location of our Windows timezone map. I wasn't aware of this script till Magnus mentioned it just now ... --- src/tools/win32tzlist.pl | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/src/tools/win32tzlist.pl b/src/tools/win32tzlist.pl index a5acee7cad..7b0452a268 100755 --- a/src/tools/win32tzlist.pl +++ b/src/tools/win32tzlist.pl @@ -8,11 +8,11 @@ ################################################################# # -# This script compares the timezone information in the Windows -# registry with that in pgtz.c. A list of changes will be written -# to stdout - no attempt is made to automatically edit the file. +# This script compares the timezone information in the Windows registry +# with that in src/bin/initdb/findtimezone.c. A list of changes will be +# written to stdout - no attempt is made to automatically edit the file. # -# Run the script from the src/timezone directory. +# Run the script from the top-level PG source directory. # use strict; @@ -20,6 +20,8 @@ use warnings; use Win32::Registry; +my $tzfile = 'src/bin/initdb/findtimezone.c'; + # # Fetch all timezones in the registry # @@ -57,16 +59,16 @@ $basekey->Close(); # Fetch all timezones currently in the file # my @file_zones; -open(PGTZ,'; -close(PGTZ); +my $pgtz = ; +close(TZFILE); $/ = $t; # Attempt to locate and extract the complete win32_tzmap struct $pgtz =~ /win32_tzmap\[\] =\s+{\s+\/\*[^\/]+\*\/\s+(.+?)};/gs - or die "Could not locate struct win32_tzmap in pgtz.c!"; + or die "Could not locate struct win32_tzmap in $tzfile!"; $pgtz = $1; # Extract each individual record from the struct