Skip to content

Commit 14a1832

Browse files
committed
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 ...
1 parent 0c8eda6 commit 14a1832

File tree

1 file changed

+10
-8
lines changed

1 file changed

+10
-8
lines changed

src/tools/win32tzlist.pl

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -8,18 +8,20 @@
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

1818
use strict;
1919
use warnings;
2020

2121
use Win32::Registry;
2222

23+
my $tzfile = 'src/bin/initdb/findtimezone.c';
24+
2325
#
2426
# Fetch all timezones in the registry
2527
#
@@ -57,16 +59,16 @@
5759
# Fetch all timezones currently in the file
5860
#
5961
my @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";
6163
my $t = $/;
6264
undef $/;
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

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy