Description:
[web] more use of utc time
git-svn-id: http://theory.cpe.ku.ac.th/grader/web/trunk@248 6386c4cd-e34a-4fa8-8920-d93eb39b512e
Commit status:
[Not Reviewed]
References:
Diff options:
Comments:
0 Commit comments
0 Inline Comments
Unresolved TODOs:
There are no unresolved TODOs
r120:a805b8fa46cc - - 1 file changed: 2 inserted, 2 deleted
@@ -36,13 +36,13 | |||||
|
36 | option << link_to_unless_current(label, |
|
36 | option << link_to_unless_current(label, |
|
37 | :controller => controller, |
|
37 | :controller => controller, |
|
38 | :action => action) |
|
38 | :action => action) |
|
39 | end |
|
39 | end |
|
40 |
|
40 | ||
|
41 | def format_short_time(time) |
|
41 | def format_short_time(time) |
|
42 | - now = Time.now |
|
42 | + now = Time.now.gmtime |
|
43 | st = '' |
|
43 | st = '' |
|
44 | if (time.yday != now.yday) or |
|
44 | if (time.yday != now.yday) or |
|
45 | (time.year != now.year) |
|
45 | (time.year != now.year) |
|
46 | st = time.strftime("%x ") |
|
46 | st = time.strftime("%x ") |
|
47 | end |
|
47 | end |
|
48 | st + time.strftime("%X") |
|
48 | st + time.strftime("%X") |
@@ -61,13 +61,13 | |||||
|
61 | <div class="title"> |
|
61 | <div class="title"> |
|
62 | <table> |
|
62 | <table> |
|
63 | #{contest_over_string} |
|
63 | #{contest_over_string} |
|
64 | <tr> |
|
64 | <tr> |
|
65 | <td class="left-col"> |
|
65 | <td class="left-col"> |
|
66 | #{user.full_name}<br/> |
|
66 | #{user.full_name}<br/> |
|
67 | - Current time is #{format_short_time(Time.new)}<br/> |
|
67 | + Current time is #{format_short_time(Time.new.gmtime)} UTC<br/> |
|
68 | </td> |
|
68 | </td> |
|
69 | <td class="right-col">APIO'08</td> |
|
69 | <td class="right-col">APIO'08</td> |
|
70 | </tr> |
|
70 | </tr> |
|
71 | </table> |
|
71 | </table> |
|
72 | </div> |
|
72 | </div> |
|
73 | TITLEBAR |
|
73 | TITLEBAR |
You need to be logged in to leave comments.
Login now