Description:
[web] fix time.new, time.now to use gmtime
git-svn-id: http://theory.cpe.ku.ac.th/grader/web/trunk@249 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
r121:00c0c912cae9 - - 3 files changed: 3 inserted, 3 deleted
@@ -41,7 +41,7 | |||||
|
41 | @submission.source = params['file'].read |
|
41 | @submission.source = params['file'].read |
|
42 | @submission.source_filename = params['file'].original_filename |
|
42 | @submission.source_filename = params['file'].original_filename |
|
43 | end |
|
43 | end |
|
44 | - @submission.submitted_at = Time.new |
|
44 | + @submission.submitted_at = Time.new.gmtime |
|
45 |
|
45 | ||
|
46 | if user.site!=nil and user.site.finished? |
|
46 | if user.site!=nil and user.site.finished? |
|
47 | @submission.errors.add_to_base "The contest is over." |
|
47 | @submission.errors.add_to_base "The contest is over." |
@@ -18,7 +18,7 | |||||
|
18 | if tmatch = /(\d+):(\d+)/.match(contest_time) |
|
18 | if tmatch = /(\d+):(\d+)/.match(contest_time) |
|
19 | h = tmatch[1].to_i |
|
19 | h = tmatch[1].to_i |
|
20 | m = tmatch[2].to_i |
|
20 | m = tmatch[2].to_i |
|
21 | - return Time.now > (self.start_time + h.hour + m.minute) |
|
21 | + return Time.now.gmtime > (self.start_time + h.hour + m.minute) |
|
22 | else |
|
22 | else |
|
23 | false |
|
23 | false |
|
24 | end |
|
24 | end |
@@ -82,7 +82,7 | |||||
|
82 | "#{test_request.input_file_name}.files") |
|
82 | "#{test_request.input_file_name}.files") |
|
83 | end |
|
83 | end |
|
84 | end |
|
84 | end |
|
85 | - test_request.submitted_at = Time.new |
|
85 | + test_request.submitted_at = Time.new.gmtime |
|
86 | test_request.status_inqueue |
|
86 | test_request.status_inqueue |
|
87 | test_request |
|
87 | test_request |
|
88 | end |
|
88 | end |
You need to be logged in to leave comments.
Login now