diff options
author | Tom Lane | 2011-09-24 01:42:24 +0000 |
---|---|---|
committer | Tom Lane | 2011-09-24 01:42:24 +0000 |
commit | 14a183261a1f9b15dc73ad34295d118ada538b5b (patch) | |
tree | f2e5a0bcd8ae371d3203f97d4bfd096e2481099a | |
parent | 0c8eda6258805223fa412ab55a1f130fbc51afa0 (diff) |
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 ...
-rwxr-xr-x | src/tools/win32tzlist.pl | 18 |
1 files 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,'<pgtz.c') or die "Could not open pgtz.c!\n"; +open(TZFILE,"<$tzfile") or die "Could not open $tzfile!\n"; my $t = $/; undef $/; -my $pgtz = <PGTZ>; -close(PGTZ); +my $pgtz = <TZFILE>; +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 |