Showing 11 changed files with 26 additions and 15 deletions
+2 -1
CHANGES
... ...
@@ -1,5 +1,6 @@
1 1
 1.6
2
-  fix bug that can't create collaborator more than one
2
+  fix bug that can't create collaborator more than one.
3
+  support time zone.
3 4
 1.5
4 5
   - fix bug that git clone via http failed.
5 6
   - show readme file in sub directory.
+10
README.md
... ...
@@ -359,6 +359,16 @@ Please fix it by the following way.
359 359
     # Restart
360 360
     ./gitprep
361 361
 
362
+## I want to set time zone.
363
+
364
+OK. GitPrep suport time zone. You can set time_zone option in conig file.
365
+
366
+    [basic]
367
+    ;;; Time Zone
368
+    ;;; GitPrep time zone is GMT by default
369
+    ;;; You can set your local time zone.
370
+    time_zone=+9:00
371
+
362 372
 ## Web Site
363 373
 
364 374
 [GitPrep Web Site](http://perlcodesample.sakura.ne.jp/gitprep-site/)
+1 -1
templates/blame.html.ep
... ...
@@ -106,7 +106,7 @@
106 106
                     <span title="<%= $line->{author_mail} %>"><%= $line->{author} %></span>
107 107
                   </div>
108 108
                   <div style="margin-top:0;padding-top:0">
109
-                    <%= $line->{author_age_string_date} %>
109
+                    <%= $line->{author_age_string_date_local} %>
110 110
                     <%= $summary_short %>
111 111
                   </div>
112 112
               </td>
+1 -1
templates/blob.html.ep
... ...
@@ -50,7 +50,7 @@
50 50
     <div class="border-gray" style="margin-bottom:20px">
51 51
       <div class="bk-blue-light" style="padding:5px">
52 52
         <a style="color:#333;font-weight:bold" href="#" title="<%= $commit->{author_email} %>"><%= $commit->{author_name} %></a>
53
-        <span class="muted" title="<%= $commit->{age_string_datetime} %>"><%= $commit->{age_string} %></span>
53
+        <span class="muted" title="<%= $commit->{age_string_datetime_local} %>"><%= $commit->{age_string} %></span>
54 54
         <a style="color:#666" href="<%= url_for("/$user/$project/commit/$commit->{id}") %>">
55 55
           <%= $commit->{title} %>
56 56
         </a>
+2 -2
templates/branches.html.ep
... ...
@@ -138,7 +138,7 @@
138 138
           </div>
139 139
           <div class="muted" style="font-size:12px">
140 140
             Last updated
141
-            <span title="<%= $base_branch->{commit}{age_string_datetime} %>">
141
+            <span title="<%= $base_branch->{commit}{age_string_datetime_local} %>">
142 142
               <%= $base_branch->{commit}{age_string} %>
143 143
             </span>
144 144
             by
... ...
@@ -166,7 +166,7 @@
166 166
             </div>
167 167
             <div style="font-size:12px">
168 168
               Last updated
169
-              <span title="<%= $branch->{commit}{age_string_datetime} %>">
169
+              <span title="<%= $branch->{commit}{age_string_datetime_local} %>">
170 170
                 <%= $branch->{commit}{age_string} %>
171 171
               </span>
172 172
               by
+1 -1
templates/commit.html.ep
... ...
@@ -107,7 +107,7 @@
107 107
       <div class="row">
108 108
         <div class="span4" style="padding:5px">
109 109
           <span><b><%= $commit->{author_name} %></b></span>
110
-          <span class="muted">authored <span title="<%= $commit->{age_string_datetime} %>"><%= $commit->{age_string} %></span>
110
+          <span class="muted">authored <span title="<%= $commit->{age_string_datetime_local} %>"><%= $commit->{age_string} %></span>
111 111
         </div>
112 112
         <div class="span7 text-right" style="padding:5px;margin-left:75px">
113 113
           % my $parents = $commit->{parents};
+2 -2
templates/commits.html.ep
... ...
@@ -28,7 +28,7 @@
28 28
   my $commits_count = @$commits;
29 29
   my $commits_date = {};
30 30
   for my $commit (@$commits) {
31
-    my $date = $commit->{age_string_date};
31
+    my $date = $commit->{age_string_date_local};
32 32
     $commits_date->{$date} ||= [];
33 33
     push @{$commits_date->{$date}}, $commit;
34 34
   }
... ...
@@ -86,7 +86,7 @@
86 86
           <div class="border-blue <%= $num eq @$commits - 1 ? 'radius-bottom' : '' %>" style="font-size:12px;border-top:none; padding:1px 5px 5px 5px">
87 87
             <div class="row">
88 88
               <div class="span8">
89
-                <span title="<%= $commit->{author_email} %>"><%= $commit->{author_name} %></span> <span class="muted" title="<%= $commit->{age_string_datetime} %>"><%= $commit->{age_string} %></span>
89
+                <span title="<%= $commit->{author_email} %>"><%= $commit->{author_name} %></span> <span class="muted" title="<%= $commit->{age_string_datetime_local} %>"><%= $commit->{age_string} %></span>
90 90
               </div>
91 91
               <div class="text-right">
92 92
                 <a class="muted" style="padding-right:18px;font-weight:bold" href="<%= url_for("/$user/$project/commit/$commit->{id}") %>">                  Browse code
+1 -1
templates/compare.html.ep
... ...
@@ -18,7 +18,7 @@
18 18
   my $commits_date = {};
19 19
   my $authors = {};
20 20
   for my $commit (@$commits) {
21
-    my $date = $commit->{age_string_date};
21
+    my $date = $commit->{age_string_date_local};
22 22
     $commits_date->{$date} ||= [];
23 23
     $authors->{$commit->{author}} = 1;
24 24
     push @{$commits_date->{$date}}, $commit;
+2 -2
templates/include/tree.html.ep
... ...
@@ -13,7 +13,7 @@
13 13
       <div class="span8">
14 14
         <span style="color:#333" title="<%= $commit->{author_email} %>"><%= $commit->{author_name} %></span>
15 15
         <span class="muted">
16
-          authored <span title="<%= $commit->{age_string_datetime} %>"><%= $commit->{age_string} %></span>
16
+          authored <span title="<%= $commit->{age_string_datetime_local} %>"><%= $commit->{age_string} %></span>
17 17
         </span>
18 18
       </div>
19 19
       <div class="text-right">
... ...
@@ -55,7 +55,7 @@
55 55
             % }
56 56
           </div>
57 57
           <div class="span2" style="width:100px">
58
-            <span title="<%= $commit->{age_string_datetime} %>"><%= $commit->{age_string} %></span>
58
+            <span title="<%= $commit->{age_string_datetime_local} %>"><%= $commit->{age_string} %></span>
59 59
           </div>
60 60
           <div class="span6" style="width:610px">
61 61
             <a class="font-black" href="<%= url_for("/$user/$project/commit/$commit->{id}") %>">
+3 -3
templates/network/graph.html.ep
... ...
@@ -18,7 +18,7 @@
18 18
     my $id = $commit->{id};
19 19
     $merged_commits_h->{$id} ||= {};
20 20
     $merged_commits_h->{$id}{age} = $commit->{age};
21
-    $merged_commits_h->{$id}{age_string_date} = $commit->{age_string_date};
21
+    $merged_commits_h->{$id}{age_string_date_local} = $commit->{age_string_date_local};
22 22
     $merged_commits_h->{$id}{title} = $commit->{title};
23 23
     $merged_commits_h->{$id}{type} = 'local';
24 24
   }
... ...
@@ -30,7 +30,7 @@
30 30
     else {
31 31
       $merged_commits_h->{$id} ||= {};
32 32
       $merged_commits_h->{$id}{age} = $commit->{age};
33
-      $merged_commits_h->{$id}{age_string_date} = $commit->{age_string_date};
33
+      $merged_commits_h->{$id}{age_string_date_local} = $commit->{age_string_date_local};
34 34
       $merged_commits_h->{$id}{title} = $commit->{title};
35 35
       $merged_commits_h->{$id}{type} = 'remote';
36 36
     }
... ...
@@ -77,7 +77,7 @@
77 77
 
78 78
               % if ($commit->{type} eq $type) {
79 79
                 <td>
80
-                  <a style="color:<%= $color %>" href="<%= url_for("/$user/$project/commit/$commit->{id}") %>" title="<%= "$commit->{title}($commit->{age_string_date})" %>">●</a>
80
+                  <a style="color:<%= $color %>" href="<%= url_for("/$user/$project/commit/$commit->{id}") %>" title="<%= "$commit->{title}($commit->{age_string_date_local})" %>">●</a>
81 81
                 </td>
82 82
               % } else {
83 83
                 <td></td>
+1 -1
templates/tags.html.ep
... ...
@@ -42,7 +42,7 @@
42 42
           <div class="border-gray" style="padding:7px 5px;border-left:none;border-right:none;border-bottom:none;">
43 43
             <div class="row">
44 44
               <div class="span3">
45
-                <span class="muted" href="<%= url_for("/$user/$project/tree/$name") %>" title="<%= $tag->{commit}{age_string_datetime} %>"><%= $tag->{commit}{age_string} %></span>
45
+                <span class="muted" href="<%= url_for("/$user/$project/tree/$name") %>" title="<%= $tag->{commit}{age_string_datetime_local} %>"><%= $tag->{commit}{age_string} %></span>
46 46
               </div>
47 47
               <div class="span8">
48 48
                 <div>