summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Documentation/RelNotes/1.7.4.2.txt7
-rwxr-xr-xgitweb/gitweb.perl6
2 files changed, 11 insertions, 2 deletions
diff --git a/Documentation/RelNotes/1.7.4.2.txt b/Documentation/RelNotes/1.7.4.2.txt
index 991dae4811..ef4ce1fcd3 100644
--- a/Documentation/RelNotes/1.7.4.2.txt
+++ b/Documentation/RelNotes/1.7.4.2.txt
@@ -12,6 +12,10 @@ Fixes since v1.7.4.1
tiny packfiles. We now close the file descriptor early when the entire
packfile fits inside one mmap window.
+ * "git bisect visualize" tried to run "gitk" in windowing
+ environments even when "gitk" is not installed, resulting in a
+ strange error message.
+
* "git clone /no/such/path" did not fail correctly.
* "git commit" did not correctly error out when the user asked to use a
@@ -45,6 +49,9 @@ Fixes since v1.7.4.1
* gitweb's "highlight" interface mishandled tabs.
+ * gitweb didn't understand timezones with GMT offset that is not
+ multiple of a whole hour.
+
* gitweb had a few forward-incompatible syntactic constructs and
also used incorrect variable when showing the file mode in a diff.
diff --git a/gitweb/gitweb.perl b/gitweb/gitweb.perl
index 0178633b26..ee69ea683a 100755
--- a/gitweb/gitweb.perl
+++ b/gitweb/gitweb.perl
@@ -2921,8 +2921,10 @@ sub parse_date {
$date{'iso-8601'} = sprintf "%04d-%02d-%02dT%02d:%02d:%02dZ",
1900+$year, 1+$mon, $mday, $hour ,$min, $sec;
- $tz =~ m/^([+\-][0-9][0-9])([0-9][0-9])$/;
- my $local = $epoch + ((int $1 + ($2/60)) * 3600);
+ my ($tz_sign, $tz_hour, $tz_min) =
+ ($tz =~ m/^([-+])(\d\d)(\d\d)$/);
+ $tz_sign = ($tz_sign eq '-' ? -1 : +1);
+ my $local = $epoch + $tz_sign*((($tz_hour*60) + $tz_min)*60);
($sec, $min, $hour, $mday, $mon, $year, $wday, $yday) = gmtime($local);
$date{'hour_local'} = $hour;
$date{'minute_local'} = $min;