From: Magnus Hagander Date: Thu, 31 Jan 2013 14:08:05 +0000 (+0100) Subject: Properly zero-pad the day-of-year part of the win32 build number X-Git-Tag: REL9_1_8~7 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=1d857a6036fa0e17c6c4f9ee116622956a8fe920;p=postgresql Properly zero-pad the day-of-year part of the win32 build number This ensure the version number increases over time. The first three digits in the version number is still set to the actual PostgreSQL version number, but the last one is intended to be an ever increasing build number, which previosly failed when it changed between 1, 2 and 3 digits long values. Noted by Deepak --- diff --git a/src/tools/msvc/Project.pm b/src/tools/msvc/Project.pm index 66752f9033..697b08da46 100644 --- a/src/tools/msvc/Project.pm +++ b/src/tools/msvc/Project.pm @@ -306,7 +306,7 @@ sub AddResourceFile my ($self, $dir, $desc, $ico) = @_; my ($sec,$min,$hour,$mday,$mon,$year,$wday,$yday,$isdst) = localtime(time); - my $d = ($year - 100) . "$yday"; + my $d = sprintf("%02d%03d", ($year - 100), $yday); if (Solution::IsNewer("$dir\\win32ver.rc",'src\port\win32ver.rc')) {