File tree Expand file tree Collapse file tree 1 file changed +10
-8
lines changed Expand file tree Collapse file tree 1 file changed +10
-8
lines changed Original file line number Diff line number Diff line change 88# ################################################################
99
1010#
11- # This script compares the timezone information in the Windows
12- # registry with that in pgtz .c. A list of changes will be written
13- # to stdout - no attempt is made to automatically edit the file.
11+ # This script compares the timezone information in the Windows registry
12+ # with that in src/bin/initdb/findtimezone .c. A list of changes will be
13+ # written to stdout - no attempt is made to automatically edit the file.
1414#
15- # Run the script from the src/timezone directory.
15+ # Run the script from the top-level PG source directory.
1616#
1717
1818use strict;
1919use warnings;
2020
2121use Win32::Registry;
2222
23+ my $tzfile = ' src/bin/initdb/findtimezone.c' ;
24+
2325#
2426# Fetch all timezones in the registry
2527#
5759# Fetch all timezones currently in the file
5860#
5961my @file_zones ;
60- open (PGTZ, ' <pgtz.c ' ) or die " Could not open pgtz.c !\n " ;
62+ open (TZFILE, " < $tzfile " ) or die " Could not open $tzfile !\n " ;
6163my $t = $/ ;
6264undef $/ ;
63- my $pgtz = <PGTZ >;
64- close (PGTZ );
65+ my $pgtz = <TZFILE >;
66+ close (TZFILE );
6567$/ = $t ;
6668
6769# Attempt to locate and extract the complete win32_tzmap struct
6870$pgtz =~ / win32_tzmap\[\] =\s +{\s +\/\* [^\/ ]+\*\/\s +(.+?)};/gs
69- or die " Could not locate struct win32_tzmap in pgtz.c !" ;
71+ or die " Could not locate struct win32_tzmap in $tzfile !" ;
7072$pgtz = $1 ;
7173
7274# Extract each individual record from the struct
You can’t perform that action at this time.
0 commit comments