Showing 2 changed files with 14 additions and 3 deletions
+9 -3
lib/Gitprep/Git.pm
... ...
@@ -1270,7 +1270,8 @@ sub parse_commit_text {
1270 1270
   
1271 1271
   # GMT
1272 1272
   {
1273
-    my ($sec, $min, $hour, $mday, $mon, $year, $wday, $yday) = gmtime($commit{committer_epoch});
1273
+    my ($sec, $min, $hour, $mday, $mon, $year, $wday, $yday)
1274
+      = gmtime($commit{committer_epoch});
1274 1275
     $commit{age_string_date} = sprintf '%4d-%02d-%02d', 1900 + $year, $mon + 1, $mday;
1275 1276
     $commit{age_string_datetime} = sprintf '%4d-%02d-%02d %02d:%02d:%02d',
1276 1277
       1900 + $year, $mon + 1, $mday, $hour, $min, $sec;
... ...
@@ -1279,11 +1280,16 @@ sub parse_commit_text {
1279 1280
   # Local Time
1280 1281
   {
1281 1282
     my $time_zone_second = $self->time_zone_second || 0;
1283
+    my $time_zone_hour = int($time_zone_second / 60);
1284
+    my $time_zone_min = $time_zone_second % 60;
1285
+    my $time_zone = $time_zone_second >= 0 ? '+' : '-';
1286
+    $time_zone .= sprintf("%02d:%02d", $time_zone_hour, $time_zone_min);
1282 1287
     
1283
-    my ($sec, $min, $hour, $mday, $mon, $year, $wday, $yday) = gmtime($commit{committer_epoch} + $time_zone_second);
1288
+    my ($sec, $min, $hour, $mday, $mon, $year, $wday, $yday)
1289
+      = gmtime($commit{committer_epoch} + $time_zone_second);
1284 1290
     $commit{age_string_date_local}
1285 1291
       = sprintf '%4d-%02d-%02d', 1900 + $year, $mon + 1, $mday;
1286
-    $commit{age_string_datetime_local} = sprintf '%4d-%02d-%02d %02d:%02d:%02d',
1292
+    $commit{age_string_datetime_local} = sprintf "%4d-%02d-%02d %02d:%02d:%02d GMT$time_zone",
1287 1293
       1900 + $year, $mon + 1, $mday, $hour, $min, $sec;
1288 1294
   }
1289 1295
   
+5
templates/commits.html.ep
... ...
@@ -45,9 +45,14 @@
45 45
   # Global variable
46 46
   stash(user => $user, project => $project, rev => $rev);
47 47
   
48
+  # Render atom xml feed
48 49
   if ($return_atom) {
49 50
     my $url = url_with->to_abs;
50 51
     
52
+    my $updated = $commits->[0];
53
+    
54
+    warn dumper $commits->[0];
55
+    
51 56
     my $xml = <<"EOS";
52 57
 <?xml version="1.0" encoding="UTF-8"?>
53 58
 <feed xmlns="http://www.w3.org/2005/Atom" xmlns:media="http://search.yahoo.com/mrss/" xml:lang="en-US">