Install the "posixrules" timezone link in MSVC builds.
authorTom Lane <[email protected]>
Sun, 7 May 2017 15:57:41 +0000 (11:57 -0400)
committerTom Lane <[email protected]>
Sun, 7 May 2017 15:57:41 +0000 (11:57 -0400)
Somehow, we'd missed ever doing this.  The consequences aren't too
severe: basically, the timezone library would fall back on its hardwired
notion of the DST transition dates to use for a POSIX-style zone name,
rather than obeying US/Eastern which is the intended behavior.  The net
effect would only be to obey current US DST law further back than it
ought to apply; so it's not real surprising that nobody noticed.

David Rowley, per report from Amit Kapila

Discussion: https://postgr.es/m/CAA4eK1LC7CaNhRAQ__C3ht1JVrPzaAXXhEJRnR5L6bfYHiLmWw@mail.gmail.com

src/tools/msvc/Install.pm

index 671d860ca34aa3a6f92d28fce2e4e39bf7d017e1..88c88c88be5112fc3fa66e500a8b13e123707372 100644 (file)
@@ -308,15 +308,20 @@ sub GenerateTimezoneFiles
    my $conf   = shift;
    my $mf     = read_file("src/timezone/Makefile");
    $mf =~ s{\\\s*[\r\n]+}{}mg;
+
    $mf =~ /^TZDATA\s*:?=\s*(.*)$/m
      || die "Could not find TZDATA line in timezone makefile\n";
    my @tzfiles = split /\s+/, $1;
 
+   $mf =~ /^POSIXRULES\s*:?=\s*(.*)$/m
+     || die "Could not find POSIXRULES line in timezone makefile\n";
+   my $posixrules = $1;
+   $posixrules =~ s/\s+//g;
+
    print "Generating timezone files...";
 
-   my @args = ("$conf/zic/zic",
-               '-d',
-               "$target/share/timezone");
+   my @args = ("$conf/zic/zic", '-d', "$target/share/timezone",
+               '-p', "$posixrules");
    foreach (@tzfiles)
    {
        my $tzfile = $_;