1
|
Inspecting 973 files
|
2
|
..C......................................................C...........................................C......................C......................C........C......C.C..............CC.....................................................................................................................................................................................................................................................................C...............................................................................C....C.................C.C.CCC.....................................................................................................................C.C...............C.............C..C......CC...C............................C...............................................................................C...........C....C.................C.C...C..........C...........C.C..C.................................C.C.........CC...CCCC.......C....CC.........
|
3
|
|
4
|
Offenses:
|
5
|
|
6
|
app/controllers/account_controller.rb:444:31: C: [Correctable] Rails/TimeZone: Do not use Time.now without zone. Use one of Time.zone.now, Time.current, Time.now.in_time_zone, Time.now.utc, Time.now.getlocal, Time.now.xmlschema, Time.now.iso8601, Time.now.jisx0301, Time.now.rfc3339, Time.now.httpdate, Time.now.to_i, Time.now.to_f instead.
|
7
|
user.last_login_on = Time.now
|
8
|
^^^
|
9
|
app/helpers/application_helper.rb:452:80: C: [Correctable] Rails/TimeZone: Do not use Time.now without zone. Use one of Time.zone.now, Time.current, Time.now.in_time_zone, Time.now.utc, Time.now.getlocal, Time.now.xmlschema, Time.now.iso8601, Time.now.jisx0301, Time.now.rfc3339, Time.now.httpdate, Time.now.to_i, Time.now.to_f instead.
|
10
|
l(:label_updated_time, distance_of_time_in_words(Time.now, page.updated_on))
|
11
|
^^^
|
12
|
app/helpers/application_helper.rb:679:43: C: [Correctable] Rails/TimeZone: Do not use Time.now without zone. Use one of Time.zone.now, Time.current, Time.now.in_time_zone, Time.now.utc, Time.now.getlocal, Time.now.xmlschema, Time.now.iso8601, Time.now.jisx0301, Time.now.rfc3339, Time.now.httpdate, Time.now.to_i, Time.now.to_f instead.
|
13
|
text = distance_of_time_in_words(Time.now, time)
|
14
|
^^^
|
15
|
app/models/attachment.rb:379:97: C: [Correctable] Rails/TimeZone: Do not use Time.now without zone. Use one of Time.zone.now, Time.current, Time.now.in_time_zone, Time.now.utc, Time.now.getlocal, Time.now.xmlschema, Time.now.iso8601, Time.now.jisx0301, Time.now.rfc3339, Time.now.httpdate, Time.now.to_i, Time.now.to_f instead.
|
16
|
Attachment.where("created_on < ? AND (container_type IS NULL OR container_type = '')", Time.now - age).destroy_all
|
17
|
^^^
|
18
|
app/models/import.rb:192:23: C: [Correctable] Rails/TimeZone: Do not use Time.now without zone. Use one of Time.zone.now, Time.current, Time.now.in_time_zone, Time.now.utc, Time.now.getlocal, Time.now.xmlschema, Time.now.iso8601, Time.now.jisx0301, Time.now.rfc3339, Time.now.httpdate, Time.now.to_i, Time.now.to_f instead.
|
19
|
started_on = Time.now
|
20
|
^^^
|
21
|
app/models/import.rb:195:68: C: [Correctable] Rails/TimeZone: Do not use Time.now without zone. Use one of Time.zone.now, Time.current, Time.now.in_time_zone, Time.now.utc, Time.now.getlocal, Time.now.xmlschema, Time.now.iso8601, Time.now.jisx0301, Time.now.rfc3339, Time.now.httpdate, Time.now.to_i, Time.now.to_f instead.
|
22
|
if (max_items && imported >= max_items) || (max_time && Time.now >= started_on + max_time)
|
23
|
^^^
|
24
|
app/models/query.rb:1541:12: C: [Correctable] Rails/TimeZone: Do not use Time.local without zone. Use one of Time.zone.local, Time.current, Time.local.in_time_zone, Time.local.utc, Time.local.getlocal, Time.local.xmlschema, Time.local.iso8601, Time.local.jisx0301, Time.local.rfc3339, Time.local.httpdate, Time.local.to_i, Time.local.to_f instead.
|
25
|
Time.local y, m, d
|
26
|
^^^^^
|
27
|
app/models/query.rb:1582:12: C: [Correctable] Rails/TimeZone: Do not use Time.parse without zone. Use one of Time.zone.parse, Time.current, Time.parse.in_time_zone, Time.parse.utc, Time.parse.getlocal, Time.parse.xmlschema, Time.parse.iso8601, Time.parse.jisx0301, Time.parse.rfc3339, Time.parse.httpdate, Time.parse.to_i, Time.parse.to_f instead.
|
28
|
Time.parse(arg) rescue nil
|
29
|
^^^^^
|
30
|
app/models/setting.rb:102:29: C: [Correctable] Rails/TimeZone: Do not use Time.now without zone. Use one of Time.zone.now, Time.current, Time.now.in_time_zone, Time.now.utc, Time.now.getlocal, Time.now.xmlschema, Time.now.iso8601, Time.now.jisx0301, Time.now.rfc3339, Time.now.httpdate, Time.now.to_i, Time.now.to_f instead.
|
31
|
@cached_cleared_on = Time.now
|
32
|
^^^
|
33
|
app/models/setting.rb:278:31: C: [Correctable] Rails/TimeZone: Do not use Time.now without zone. Use one of Time.zone.now, Time.current, Time.now.in_time_zone, Time.now.utc, Time.now.getlocal, Time.now.xmlschema, Time.now.iso8601, Time.now.jisx0301, Time.now.rfc3339, Time.now.httpdate, Time.now.to_i, Time.now.to_f instead.
|
34
|
@cached_cleared_on = Time.now
|
35
|
^^^
|
36
|
app/models/token.rb:70:12: C: [Correctable] Rails/TimeZone: Do not use Time.now without zone. Use one of Time.zone.now, Time.current, Time.now.in_time_zone, Time.now.utc, Time.now.getlocal, Time.now.xmlschema, Time.now.iso8601, Time.now.jisx0301, Time.now.rfc3339, Time.now.httpdate, Time.now.to_i, Time.now.to_f instead.
|
37
|
Time.now - validity_time
|
38
|
^^^
|
39
|
app/models/user.rb:338:40: C: [Correctable] Rails/TimeZone: Do not use Time.now without zone. Use one of Time.zone.now, Time.current, Time.now.in_time_zone, Time.now.utc, Time.now.getlocal, Time.now.xmlschema, Time.now.iso8601, Time.now.jisx0301, Time.now.rfc3339, Time.now.httpdate, Time.now.to_i, Time.now.to_f instead.
|
40
|
update_column(:last_login_on, Time.now)
|
41
|
^^^
|
42
|
app/models/user.rb:355:35: C: [Correctable] Rails/TimeZone: Do not use Time.now without zone. Use one of Time.zone.now, Time.current, Time.now.in_time_zone, Time.now.utc, Time.now.getlocal, Time.now.xmlschema, Time.now.iso8601, Time.now.jisx0301, Time.now.rfc3339, Time.now.httpdate, Time.now.to_i, Time.now.to_f instead.
|
43
|
self.passwd_changed_on = Time.now.change(:usec => 0)
|
44
|
^^^
|
45
|
app/models/user.rb:369:51: C: [Correctable] Rails/TimeZone: Do not use Time.at without zone. Use one of Time.zone.at, Time.current, Time.at.in_time_zone, Time.at.utc, Time.at.getlocal, Time.at.xmlschema, Time.at.iso8601, Time.at.jisx0301, Time.at.rfc3339, Time.at.httpdate, Time.at.to_i, Time.at.to_f instead.
|
46
|
changed_on = self.passwd_changed_on || Time.at(0)
|
47
|
^^
|
48
|
app/models/user.rb:492:42: C: [Correctable] Rails/TimeZone: Do not use Time.now without zone. Use one of Time.zone.now, Time.current, Time.now.in_time_zone, Time.now.utc, Time.now.getlocal, Time.now.xmlschema, Time.now.iso8601, Time.now.jisx0301, Time.now.rfc3339, Time.now.httpdate, Time.now.to_i, Time.now.to_f instead.
|
49
|
scope.update_all(:updated_on => Time.now) == 1
|
50
|
^^^
|
51
|
app/models/user.rb:581:12: C: Rails/Date: Do not use Date.today without zone. Use Time.zone.today instead.
|
52
|
Date.today
|
53
|
^^^^^
|
54
|
app/views/common/feed.atom.builder:10:66: C: [Correctable] Rails/TimeZone: Do not use Time.now without zone. Use one of Time.zone.now, Time.current, Time.now.in_time_zone, Time.now.utc, Time.now.getlocal, Time.now.xmlschema, Time.now.iso8601, Time.now.jisx0301, Time.now.rfc3339, Time.now.httpdate, Time.now.to_i, Time.now.to_f instead.
|
55
|
xml.updated((@items.first ? @items.first.event_datetime : Time.now).xmlschema)
|
56
|
^^^
|
57
|
app/views/journals/index.builder:10:72: C: [Correctable] Rails/TimeZone: Do not use Time.now without zone. Use one of Time.zone.now, Time.current, Time.now.in_time_zone, Time.now.utc, Time.now.getlocal, Time.now.xmlschema, Time.now.iso8601, Time.now.jisx0301, Time.now.rfc3339, Time.now.httpdate, Time.now.to_i, Time.now.to_f instead.
|
58
|
xml.updated((@journals.first ? @journals.first.event_datetime : Time.now).xmlschema)
|
59
|
^^^
|
60
|
db/migrate/20150113211532_populate_email_addresses.rb:4:50: C: [Correctable] Rails/TimeZone: Do not use Time.now without zone. Use one of Time.zone.now, Time.current, Time.now.in_time_zone, Time.now.utc, Time.now.getlocal, Time.now.xmlschema, Time.now.iso8601, Time.now.jisx0301, Time.now.rfc3339, Time.now.httpdate, Time.now.to_i, Time.now.to_f instead.
|
61
|
n = EmailAddress.connection.quoted_date(Time.now)
|
62
|
^^^
|
63
|
lib/redmine/helpers/time_report.rb:85:29: C: Rails/Date: Do not use to_time on Date objects, because they know nothing about the time zone in use.
|
64
|
date_from = @from.to_time
|
65
|
^^^^^^^
|
66
|
lib/redmine/helpers/time_report.rb:87:34: C: Rails/Date: Do not use to_time on Date objects, because they know nothing about the time zone in use.
|
67
|
while date_from <= @to.to_time && @periods.length < 100
|
68
|
^^^^^^^
|
69
|
lib/redmine/i18n.rb:83:19: C: Rails/Date: Do not use to_time on Date objects, because they know nothing about the time zone in use.
|
70
|
time = time.to_time if time.is_a?(String)
|
71
|
^^^^^^^
|
72
|
lib/redmine/scm/adapters/bazaar_adapter.rb:156:40: C: [Correctable] Rails/TimeZone: Do not use Time.localtime without offset or zone.
|
73
|
revision.time = Time.parse($1).localtime
|
74
|
^^^^^
|
75
|
lib/redmine/scm/adapters/cvs_adapter.rb:113:28: C: [Correctable] Rails/TimeZone: Do not use Time.parse without zone. Use one of Time.zone.parse, Time.current, Time.parse.in_time_zone, Time.parse.utc, Time.parse.getlocal, Time.parse.xmlschema, Time.parse.iso8601, Time.parse.jisx0301, Time.parse.rfc3339, Time.parse.httpdate, Time.parse.to_i, Time.parse.to_f instead.
|
76
|
Time.parse(
|
77
|
^^^^^
|
78
|
lib/redmine/scm/adapters/cvs_adapter.rb:259:39: C: [Correctable] Rails/TimeZone: Do not use Time.parse without zone. Use one of Time.zone.parse, Time.current, Time.parse.in_time_zone, Time.parse.utc, Time.parse.getlocal, Time.parse.xmlschema, Time.parse.iso8601, Time.parse.jisx0301, Time.parse.rfc3339, Time.parse.httpdate, Time.parse.to_i, Time.parse.to_f instead.
|
79
|
date = Time.parse($1)
|
80
|
^^^^^
|
81
|
lib/redmine/scm/adapters/cvs_adapter.rb:358:23: C: [Correctable] Rails/TimeZone: Do not use Time.now without zone. Use one of Time.zone.now, Time.current, Time.now.in_time_zone, Time.now.utc, Time.now.getlocal, Time.now.xmlschema, Time.now.iso8601, Time.now.jisx0301, Time.now.rfc3339, Time.now.httpdate, Time.now.to_i, Time.now.to_f instead.
|
82
|
time = Time.now if (time.is_a?(String) && time == 'HEAD')
|
83
|
^^^
|
84
|
lib/redmine/scm/adapters/cvs_adapter.rb:360:25: C: [Correctable] Rails/TimeZone: Do not use Time.parse without zone. Use one of Time.zone.parse, Time.current, Time.parse.in_time_zone, Time.parse.utc, Time.parse.getlocal, Time.parse.xmlschema, Time.parse.iso8601, Time.parse.jisx0301, Time.parse.rfc3339, Time.parse.httpdate, Time.parse.to_i, Time.parse.to_f instead.
|
85
|
time = Time.parse(time)
|
86
|
^^^^^
|
87
|
lib/redmine/scm/adapters/git_adapter.rb:197:25: C: [Correctable] Rails/TimeZone: Do not use Time.parse without zone. Use one of Time.zone.parse, Time.current, Time.parse.in_time_zone, Time.parse.utc, Time.parse.getlocal, Time.parse.xmlschema, Time.parse.iso8601, Time.parse.jisx0301, Time.parse.rfc3339, Time.parse.httpdate, Time.parse.to_i, Time.parse.to_f instead.
|
88
|
time = Time.parse(lines[4].match('CommitDate:\s+(.*)$')[1])
|
89
|
^^^^^
|
90
|
lib/redmine/scm/adapters/git_adapter.rb:267:47: C: [Correctable] Rails/TimeZone: Do not use Time.parse without zone. Use one of Time.zone.parse, Time.current, Time.parse.in_time_zone, Time.parse.utc, Time.parse.getlocal, Time.parse.xmlschema, Time.parse.iso8601, Time.parse.jisx0301, Time.parse.rfc3339, Time.parse.httpdate, Time.parse.to_i, Time.parse.to_f instead.
|
91
|
:time => Time.parse(changeset[:date]),
|
92
|
^^^^^
|
93
|
lib/redmine/scm/adapters/git_adapter.rb:325:43: C: [Correctable] Rails/TimeZone: Do not use Time.parse without zone. Use one of Time.zone.parse, Time.current, Time.parse.in_time_zone, Time.parse.utc, Time.parse.getlocal, Time.parse.xmlschema, Time.parse.iso8601, Time.parse.jisx0301, Time.parse.rfc3339, Time.parse.httpdate, Time.parse.to_i, Time.parse.to_f instead.
|
94
|
:time => Time.parse(changeset[:date]),
|
95
|
^^^^^
|
96
|
lib/redmine/scm/adapters/mercurial_adapter.rb:171:45: C: [Correctable] Rails/TimeZone: Do not use Time.at without zone. Use one of Time.zone.at, Time.current, Time.at.in_time_zone, Time.at.utc, Time.at.getlocal, Time.at.xmlschema, Time.at.iso8601, Time.at.jisx0301, Time.at.rfc3339, Time.at.httpdate, Time.at.to_i, Time.at.to_f instead.
|
97
|
:time => Time.at(e['time'].to_i))
|
98
|
^^
|
99
|
lib/redmine/scm/adapters/mercurial_adapter.rb:232:50: C: [Correctable] Rails/TimeZone: Do not use Time.parse without zone. Use one of Time.zone.parse, Time.current, Time.parse.in_time_zone, Time.parse.utc, Time.parse.getlocal, Time.parse.xmlschema, Time.parse.iso8601, Time.parse.jisx0301, Time.parse.rfc3339, Time.parse.httpdate, Time.parse.to_i, Time.parse.to_f instead.
|
100
|
:time => Time.parse(le['date']['__content__']),
|
101
|
^^^^^
|
102
|
lib/redmine/scm/adapters/subversion_adapter.rb:79:39: C: [Correctable] Rails/TimeZone: Do not use Time.localtime without offset or zone.
|
103
|
:time => Time.parse(doc['info']['entry']['commit']['date']['__content__']).localtime,
|
104
|
^^^^^
|
105
|
lib/redmine/scm/adapters/subversion_adapter.rb:126:43: C: [Correctable] Rails/TimeZone: Do not use Time.localtime without offset or zone.
|
106
|
:time => Time.parse(commit_date['__content__'].to_s).localtime,
|
107
|
^^^^^
|
108
|
lib/redmine/scm/adapters/subversion_adapter.rb:201:37: C: [Correctable] Rails/TimeZone: Do not use Time.localtime without offset or zone.
|
109
|
:time => Time.parse(logentry['date']['__content__'].to_s).localtime,
|
110
|
^^^^^
|
111
|
test/functional/issue_relations_controller_test.rb:159:48: C: Rails/Date: Do not use Date.today without zone. Use Time.zone.today instead.
|
112
|
:due_date => Date.today)
|
113
|
^^^^^
|
114
|
test/functional/issues_controller_test.rb:914:27: C: Rails/Date: Do not use Date.today without zone. Use Time.zone.today instead.
|
115
|
:spent_on => Date.today
|
116
|
^^^^^
|
117
|
test/functional/issues_controller_test.rb:3557:26: C: Rails/Date: Do not use Date.today without zone. Use Time.zone.today instead.
|
118
|
Date.today.to_s
|
119
|
^^^^^
|
120
|
test/functional/issues_controller_test.rb:4007:25: C: Rails/Date: Do not use Date.today without zone. Use Time.zone.today instead.
|
121
|
assert_equal Date.today, issue.start_date
|
122
|
^^^^^
|
123
|
test/functional/repositories_controller_test.rb:466:31: C: [Correctable] Rails/TimeZone: Do not use Time.now without zone. Use one of Time.zone.now, Time.current, Time.now.in_time_zone, Time.now.utc, Time.now.getlocal, Time.now.xmlschema, Time.now.iso8601, Time.now.jisx0301, Time.now.rfc3339, Time.now.httpdate, Time.now.to_i, Time.now.to_f instead.
|
124
|
:committed_on => Time.now,
|
125
|
^^^
|
126
|
test/functional/repositories_controller_test.rb:490:35: C: [Correctable] Rails/TimeZone: Do not use Time.now without zone. Use one of Time.zone.now, Time.current, Time.now.in_time_zone, Time.now.utc, Time.now.getlocal, Time.now.xmlschema, Time.now.iso8601, Time.now.jisx0301, Time.now.rfc3339, Time.now.httpdate, Time.now.to_i, Time.now.to_f instead.
|
127
|
:committed_on => Time.now,
|
128
|
^^^
|
129
|
test/functional/timelog_report_test.rb:119:134: C: Rails/Date: Do not use Date.today without zone. Use Time.zone.today instead.
|
130
|
entry = TimeEntry.create!(:project => Project.find(1), :hours => 1, :activity_id => 10, :user => User.find(2), :spent_on => Date.today)
|
131
|
^^^^^
|
132
|
test/functional/versions_controller_test.rb:296:33: C: Rails/Date: Do not use Date.today without zone. Use Time.zone.today instead.
|
133
|
:effective_date => Date.today.strftime("%Y-%m-%d")
|
134
|
^^^^^
|
135
|
test/functional/versions_controller_test.rb:303:23: C: Rails/Date: Do not use Date.today without zone. Use Time.zone.today instead.
|
136
|
assert_equal Date.today, version.effective_date
|
137
|
^^^^^
|
138
|
test/functional/versions_controller_test.rb:312:33: C: Rails/Date: Do not use Date.today without zone. Use Time.zone.today instead.
|
139
|
:effective_date => Date.today.strftime("%Y-%m-%d")
|
140
|
^^^^^
|
141
|
test/helpers/activities_helper_test.rb:33:30: C: [Correctable] Rails/TimeZone: Do not use Time.now without zone. Use one of Time.zone.now, Time.current, Time.now.in_time_zone, Time.now.utc, Time.now.getlocal, Time.now.xmlschema, Time.now.iso8601, Time.now.jisx0301, Time.now.rfc3339, Time.now.httpdate, Time.now.to_i, Time.now.to_f instead.
|
142
|
@event_datetime = Time.now + @@count.hours
|
143
|
^^^
|
144
|
test/helpers/application_helper_test.rb:701:65: C: [Correctable] Rails/TimeZone: Do not use Time.now without zone. Use one of Time.zone.now, Time.current, Time.now.in_time_zone, Time.now.utc, Time.now.getlocal, Time.now.xmlschema, Time.now.iso8601, Time.now.jisx0301, Time.now.rfc3339, Time.now.httpdate, Time.now.to_i, Time.now.to_f instead.
|
145
|
Changeset.create!(:repository => svn, :committed_on => Time.now, :revision => '123')
|
146
|
^^^
|
147
|
test/helpers/application_helper_test.rb:703:64: C: [Correctable] Rails/TimeZone: Do not use Time.now without zone. Use one of Time.zone.now, Time.current, Time.now.in_time_zone, Time.now.utc, Time.now.getlocal, Time.now.xmlschema, Time.now.iso8601, Time.now.jisx0301, Time.now.rfc3339, Time.now.httpdate, Time.now.to_i, Time.now.to_f instead.
|
148
|
Changeset.create!(:repository => hg, :committed_on => Time.now, :revision => '123', :scmid => 'abcd')
|
149
|
^^^
|
150
|
test/helpers/application_helper_test.rb:756:65: C: [Correctable] Rails/TimeZone: Do not use Time.now without zone. Use one of Time.zone.now, Time.current, Time.now.in_time_zone, Time.now.utc, Time.now.getlocal, Time.now.xmlschema, Time.now.iso8601, Time.now.jisx0301, Time.now.rfc3339, Time.now.httpdate, Time.now.to_i, Time.now.to_f instead.
|
151
|
Changeset.create!(:repository => svn, :committed_on => Time.now, :revision => '123')
|
152
|
^^^
|
153
|
test/helpers/application_helper_test.rb:758:64: C: [Correctable] Rails/TimeZone: Do not use Time.now without zone. Use one of Time.zone.now, Time.current, Time.now.in_time_zone, Time.now.utc, Time.now.getlocal, Time.now.xmlschema, Time.now.iso8601, Time.now.jisx0301, Time.now.rfc3339, Time.now.httpdate, Time.now.to_i, Time.now.to_f instead.
|
154
|
Changeset.create!(:repository => hg, :committed_on => Time.now, :revision => '123', :scmid => 'abcd')
|
155
|
^^^
|
156
|
test/helpers/application_helper_test.rb:817:31: C: [Correctable] Rails/TimeZone: Do not use Time.now without zone. Use one of Time.zone.now, Time.current, Time.now.in_time_zone, Time.now.utc, Time.now.getlocal, Time.now.xmlschema, Time.now.iso8601, Time.now.jisx0301, Time.now.rfc3339, Time.now.httpdate, Time.now.to_i, Time.now.to_f instead.
|
157
|
:committed_on => Time.now,
|
158
|
^^^
|
159
|
test/helpers/application_helper_test.rb:847:31: C: [Correctable] Rails/TimeZone: Do not use Time.now without zone. Use one of Time.zone.now, Time.current, Time.now.in_time_zone, Time.now.utc, Time.now.getlocal, Time.now.xmlschema, Time.now.iso8601, Time.now.jisx0301, Time.now.rfc3339, Time.now.httpdate, Time.now.to_i, Time.now.to_f instead.
|
160
|
:committed_on => Time.now,
|
161
|
^^^
|
162
|
test/helpers/application_helper_test.rb:1629:12: C: Rails/Date: Do not use Date.today without zone. Use Time.zone.today instead.
|
163
|
Date.today => 'Due in 0 days',
|
164
|
^^^^^
|
165
|
test/helpers/application_helper_test.rb:1630:12: C: Rails/Date: Do not use Date.today without zone. Use Time.zone.today instead.
|
166
|
Date.today + 1 => 'Due in 1 day',
|
167
|
^^^^^
|
168
|
test/helpers/application_helper_test.rb:1631:12: C: Rails/Date: Do not use Date.today without zone. Use Time.zone.today instead.
|
169
|
Date.today + 100 => 'Due in about 3 months',
|
170
|
^^^^^
|
171
|
test/helpers/application_helper_test.rb:1632:12: C: Rails/Date: Do not use Date.today without zone. Use Time.zone.today instead.
|
172
|
Date.today + 20000 => 'Due in over 54 years',
|
173
|
^^^^^
|
174
|
test/helpers/application_helper_test.rb:1633:12: C: Rails/Date: Do not use Date.today without zone. Use Time.zone.today instead.
|
175
|
Date.today - 1 => '1 day late',
|
176
|
^^^^^
|
177
|
test/helpers/application_helper_test.rb:1634:12: C: Rails/Date: Do not use Date.today without zone. Use Time.zone.today instead.
|
178
|
Date.today - 100 => 'about 3 months late',
|
179
|
^^^^^
|
180
|
test/helpers/application_helper_test.rb:1635:12: C: Rails/Date: Do not use Date.today without zone. Use Time.zone.today instead.
|
181
|
Date.today - 20000 => 'over 54 years late',
|
182
|
^^^^^
|
183
|
test/helpers/application_helper_test.rb:1666:40: C: [Correctable] Rails/TimeZone: Do not use Time.now without zone. Use one of Time.zone.now, Time.current, Time.now.in_time_zone, Time.now.utc, Time.now.getlocal, Time.now.xmlschema, Time.now.iso8601, Time.now.jisx0301, Time.now.rfc3339, Time.now.httpdate, Time.now.to_i, Time.now.to_f instead.
|
184
|
distance_of_time_in_words(Time.now, parent_page.updated_on)))
|
185
|
^^^
|
186
|
test/helpers/application_helper_test.rb:1670:40: C: [Correctable] Rails/TimeZone: Do not use Time.now without zone. Use one of Time.zone.now, Time.current, Time.now.in_time_zone, Time.now.utc, Time.now.getlocal, Time.now.xmlschema, Time.now.iso8601, Time.now.jisx0301, Time.now.rfc3339, Time.now.httpdate, Time.now.to_i, Time.now.to_f instead.
|
187
|
distance_of_time_in_words(Time.now, child_page.updated_on)))
|
188
|
^^^
|
189
|
test/helpers/issues_helper_test.rb:352:20: C: [Correctable] Rails/TimeZone: Do not use Time.parse without zone. Use one of Time.zone.parse, Time.current, Time.parse.in_time_zone, Time.parse.utc, Time.parse.getlocal, Time.parse.xmlschema, Time.parse.iso8601, Time.parse.jisx0301, Time.parse.rfc3339, Time.parse.httpdate, Time.parse.to_i, Time.parse.to_f instead.
|
190
|
travel_to Time.parse('2019-06-01 23:00:00 UTC') do
|
191
|
^^^^^
|
192
|
test/integration/api_test/issues_test.rb:146:70: C: [Correctable] Rails/TimeZone: Do not use Time.parse without zone. Use one of Time.zone.parse, Time.current, Time.parse.in_time_zone, Time.parse.utc, Time.parse.getlocal, Time.parse.xmlschema, Time.parse.iso8601, Time.parse.jisx0301, Time.parse.rfc3339, Time.parse.httpdate, Time.parse.to_i, Time.parse.to_f instead.
|
193
|
Issue.generate!(:subject => '1').update_column(:updated_on, Time.parse("2014-01-02T10:25:00Z"))
|
194
|
^^^^^
|
195
|
test/integration/api_test/issues_test.rb:147:70: C: [Correctable] Rails/TimeZone: Do not use Time.parse without zone. Use one of Time.zone.parse, Time.current, Time.parse.in_time_zone, Time.parse.utc, Time.parse.getlocal, Time.parse.xmlschema, Time.parse.iso8601, Time.parse.jisx0301, Time.parse.rfc3339, Time.parse.httpdate, Time.parse.to_i, Time.parse.to_f instead.
|
196
|
Issue.generate!(:subject => '2').update_column(:updated_on, Time.parse("2014-01-02T12:13:00Z"))
|
197
|
^^^^^
|
198
|
test/object_helpers.rb:153:29: C: Rails/Date: Do not use Date.today without zone. Use Time.zone.today instead.
|
199
|
entry.spent_on ||= Date.today
|
200
|
^^^^^
|
201
|
test/object_helpers.rb:222:37: C: [Correctable] Rails/TimeZone: Do not use Time.now without zone. Use one of Time.zone.now, Time.current, Time.now.in_time_zone, Time.now.utc, Time.now.getlocal, Time.now.xmlschema, Time.now.iso8601, Time.now.jisx0301, Time.now.rfc3339, Time.now.httpdate, Time.now.to_i, Time.now.to_f instead.
|
202
|
changeset.committed_on ||= Time.now
|
203
|
^^^
|
204
|
test/unit/activity_test.rb:198:63: C: Rails/Date: Do not use Date.today without zone. Use Time.zone.today instead.
|
205
|
Redmine::Activity::Fetcher.new(user, options).events(Date.today - 30, Date.today + 1)
|
206
|
^^^^^
|
207
|
test/unit/activity_test.rb:198:80: C: Rails/Date: Do not use Date.today without zone. Use Time.zone.today instead.
|
208
|
Redmine::Activity::Fetcher.new(user, options).events(Date.today - 30, Date.today + 1)
|
209
|
^^^^^
|
210
|
test/unit/changeset_test.rb:45:45: C: [Correctable] Rails/TimeZone: Do not use Time.now without zone. Use one of Time.zone.now, Time.current, Time.now.in_time_zone, Time.now.utc, Time.now.getlocal, Time.now.xmlschema, Time.now.iso8601, Time.now.jisx0301, Time.now.rfc3339, Time.now.httpdate, Time.now.to_i, Time.now.to_f instead.
|
211
|
:committed_on => Time.now,
|
212
|
^^^
|
213
|
test/unit/changeset_test.rb:60:45: C: [Correctable] Rails/TimeZone: Do not use Time.now without zone. Use one of Time.zone.now, Time.current, Time.now.in_time_zone, Time.now.utc, Time.now.getlocal, Time.now.xmlschema, Time.now.iso8601, Time.now.jisx0301, Time.now.rfc3339, Time.now.httpdate, Time.now.to_i, Time.now.to_f instead.
|
214
|
:committed_on => Time.now,
|
215
|
^^^
|
216
|
test/unit/changeset_test.rb:71:45: C: [Correctable] Rails/TimeZone: Do not use Time.now without zone. Use one of Time.zone.now, Time.current, Time.now.in_time_zone, Time.now.utc, Time.now.getlocal, Time.now.xmlschema, Time.now.iso8601, Time.now.jisx0301, Time.now.rfc3339, Time.now.httpdate, Time.now.to_i, Time.now.to_f instead.
|
217
|
:committed_on => Time.now,
|
218
|
^^^
|
219
|
test/unit/changeset_test.rb:160:45: C: [Correctable] Rails/TimeZone: Do not use Time.now without zone. Use one of Time.zone.now, Time.current, Time.now.in_time_zone, Time.now.utc, Time.now.getlocal, Time.now.xmlschema, Time.now.iso8601, Time.now.jisx0301, Time.now.rfc3339, Time.now.httpdate, Time.now.to_i, Time.now.to_f instead.
|
220
|
:committed_on => Time.now,
|
221
|
^^^
|
222
|
test/unit/changeset_test.rb:178:45: C: [Correctable] Rails/TimeZone: Do not use Time.now without zone. Use one of Time.zone.now, Time.current, Time.now.in_time_zone, Time.now.utc, Time.now.getlocal, Time.now.xmlschema, Time.now.iso8601, Time.now.jisx0301, Time.now.rfc3339, Time.now.httpdate, Time.now.to_i, Time.now.to_f instead.
|
223
|
:committed_on => Time.now,
|
224
|
^^^
|
225
|
test/unit/changeset_test.rb:188:45: C: [Correctable] Rails/TimeZone: Do not use Time.now without zone. Use one of Time.zone.now, Time.current, Time.now.in_time_zone, Time.now.utc, Time.now.getlocal, Time.now.xmlschema, Time.now.iso8601, Time.now.jisx0301, Time.now.rfc3339, Time.now.httpdate, Time.now.to_i, Time.now.to_f instead.
|
226
|
:committed_on => Time.now,
|
227
|
^^^
|
228
|
test/unit/changeset_test.rb:198:45: C: [Correctable] Rails/TimeZone: Do not use Time.now without zone. Use one of Time.zone.now, Time.current, Time.now.in_time_zone, Time.now.utc, Time.now.getlocal, Time.now.xmlschema, Time.now.iso8601, Time.now.jisx0301, Time.now.rfc3339, Time.now.httpdate, Time.now.to_i, Time.now.to_f instead.
|
229
|
:committed_on => Time.now,
|
230
|
^^^
|
231
|
test/unit/changeset_test.rb:208:45: C: [Correctable] Rails/TimeZone: Do not use Time.now without zone. Use one of Time.zone.now, Time.current, Time.now.in_time_zone, Time.now.utc, Time.now.getlocal, Time.now.xmlschema, Time.now.iso8601, Time.now.jisx0301, Time.now.rfc3339, Time.now.httpdate, Time.now.to_i, Time.now.to_f instead.
|
232
|
:committed_on => Time.now,
|
233
|
^^^
|
234
|
test/unit/changeset_test.rb:306:45: C: [Correctable] Rails/TimeZone: Do not use Time.now without zone. Use one of Time.zone.now, Time.current, Time.now.in_time_zone, Time.now.utc, Time.now.getlocal, Time.now.xmlschema, Time.now.iso8601, Time.now.jisx0301, Time.now.rfc3339, Time.now.httpdate, Time.now.to_i, Time.now.to_f instead.
|
235
|
:committed_on => Time.now,
|
236
|
^^^
|
237
|
test/unit/changeset_test.rb:321:49: C: [Correctable] Rails/TimeZone: Do not use Time.now without zone. Use one of Time.zone.now, Time.current, Time.now.in_time_zone, Time.now.utc, Time.now.getlocal, Time.now.xmlschema, Time.now.iso8601, Time.now.jisx0301, Time.now.rfc3339, Time.now.httpdate, Time.now.to_i, Time.now.to_f instead.
|
238
|
:committed_on => Time.now,
|
239
|
^^^
|
240
|
test/unit/changeset_test.rb:341:45: C: [Correctable] Rails/TimeZone: Do not use Time.now without zone. Use one of Time.zone.now, Time.current, Time.now.in_time_zone, Time.now.utc, Time.now.getlocal, Time.now.xmlschema, Time.now.iso8601, Time.now.jisx0301, Time.now.rfc3339, Time.now.httpdate, Time.now.to_i, Time.now.to_f instead.
|
241
|
:committed_on => Time.now,
|
242
|
^^^
|
243
|
test/unit/changeset_test.rb:357:47: C: [Correctable] Rails/TimeZone: Do not use Time.now without zone. Use one of Time.zone.now, Time.current, Time.now.in_time_zone, Time.now.utc, Time.now.getlocal, Time.now.xmlschema, Time.now.iso8601, Time.now.jisx0301, Time.now.rfc3339, Time.now.httpdate, Time.now.to_i, Time.now.to_f instead.
|
244
|
:committed_on => Time.now,
|
245
|
^^^
|
246
|
test/unit/changeset_test.rb:373:47: C: [Correctable] Rails/TimeZone: Do not use Time.now without zone. Use one of Time.zone.now, Time.current, Time.now.in_time_zone, Time.now.utc, Time.now.getlocal, Time.now.xmlschema, Time.now.iso8601, Time.now.jisx0301, Time.now.rfc3339, Time.now.httpdate, Time.now.to_i, Time.now.to_f instead.
|
247
|
:committed_on => Time.now,
|
248
|
^^^
|
249
|
test/unit/changeset_test.rb:387:34: C: [Correctable] Rails/TimeZone: Do not use Time.now without zone. Use one of Time.zone.now, Time.current, Time.now.in_time_zone, Time.now.utc, Time.now.getlocal, Time.now.xmlschema, Time.now.iso8601, Time.now.jisx0301, Time.now.rfc3339, Time.now.httpdate, Time.now.to_i, Time.now.to_f instead.
|
250
|
repository.created_on = Time.now
|
251
|
^^^
|
252
|
test/unit/changeset_test.rb:407:16: C: [Correctable] Rails/TimeZone: Do not use Time.now without zone. Use one of Time.zone.now, Time.current, Time.now.in_time_zone, Time.now.utc, Time.now.getlocal, Time.now.xmlschema, Time.now.iso8601, Time.now.jisx0301, Time.now.rfc3339, Time.now.httpdate, Time.now.to_i, Time.now.to_f instead.
|
253
|
now = Time.now
|
254
|
^^^
|
255
|
test/unit/changeset_test.rb:509:45: C: [Correctable] Rails/TimeZone: Do not use Time.now without zone. Use one of Time.zone.now, Time.current, Time.now.in_time_zone, Time.now.utc, Time.now.getlocal, Time.now.xmlschema, Time.now.iso8601, Time.now.jisx0301, Time.now.rfc3339, Time.now.httpdate, Time.now.to_i, Time.now.to_f instead.
|
256
|
:committed_on => Time.now,
|
257
|
^^^
|
258
|
test/unit/changeset_test.rb:528:45: C: [Correctable] Rails/TimeZone: Do not use Time.now without zone. Use one of Time.zone.now, Time.current, Time.now.in_time_zone, Time.now.utc, Time.now.getlocal, Time.now.xmlschema, Time.now.iso8601, Time.now.jisx0301, Time.now.rfc3339, Time.now.httpdate, Time.now.to_i, Time.now.to_f instead.
|
259
|
:committed_on => Time.now,
|
260
|
^^^
|
261
|
test/unit/changeset_test.rb:549:45: C: [Correctable] Rails/TimeZone: Do not use Time.now without zone. Use one of Time.zone.now, Time.current, Time.now.in_time_zone, Time.now.utc, Time.now.getlocal, Time.now.xmlschema, Time.now.iso8601, Time.now.jisx0301, Time.now.rfc3339, Time.now.httpdate, Time.now.to_i, Time.now.to_f instead.
|
262
|
:committed_on => Time.now,
|
263
|
^^^
|
264
|
test/unit/changeset_test.rb:576:45: C: [Correctable] Rails/TimeZone: Do not use Time.now without zone. Use one of Time.zone.now, Time.current, Time.now.in_time_zone, Time.now.utc, Time.now.getlocal, Time.now.xmlschema, Time.now.iso8601, Time.now.jisx0301, Time.now.rfc3339, Time.now.httpdate, Time.now.to_i, Time.now.to_f instead.
|
265
|
:committed_on => Time.now,
|
266
|
^^^
|
267
|
test/unit/changeset_test.rb:597:36: C: [Correctable] Rails/TimeZone: Do not use Time.now without zone. Use one of Time.zone.now, Time.current, Time.now.in_time_zone, Time.now.utc, Time.now.getlocal, Time.now.xmlschema, Time.now.iso8601, Time.now.jisx0301, Time.now.rfc3339, Time.now.httpdate, Time.now.to_i, Time.now.to_f instead.
|
268
|
:committed_on => Time.now,
|
269
|
^^^
|
270
|
test/unit/changeset_test.rb:626:45: C: [Correctable] Rails/TimeZone: Do not use Time.now without zone. Use one of Time.zone.now, Time.current, Time.now.in_time_zone, Time.now.utc, Time.now.getlocal, Time.now.xmlschema, Time.now.iso8601, Time.now.jisx0301, Time.now.rfc3339, Time.now.httpdate, Time.now.to_i, Time.now.to_f instead.
|
271
|
:committed_on => Time.now,
|
272
|
^^^
|
273
|
test/unit/changeset_test.rb:647:45: C: [Correctable] Rails/TimeZone: Do not use Time.now without zone. Use one of Time.zone.now, Time.current, Time.now.in_time_zone, Time.now.utc, Time.now.getlocal, Time.now.xmlschema, Time.now.iso8601, Time.now.jisx0301, Time.now.rfc3339, Time.now.httpdate, Time.now.to_i, Time.now.to_f instead.
|
274
|
:committed_on => Time.now,
|
275
|
^^^
|
276
|
test/unit/changeset_test.rb:661:45: C: [Correctable] Rails/TimeZone: Do not use Time.now without zone. Use one of Time.zone.now, Time.current, Time.now.in_time_zone, Time.now.utc, Time.now.getlocal, Time.now.xmlschema, Time.now.iso8601, Time.now.jisx0301, Time.now.rfc3339, Time.now.httpdate, Time.now.to_i, Time.now.to_f instead.
|
277
|
:committed_on => Time.now,
|
278
|
^^^
|
279
|
test/unit/issue_nested_set_test.rb:254:48: C: Rails/Date: Do not use Date.today without zone. Use Time.zone.today instead.
|
280
|
parent.generate_child!(:start_date => Date.today)
|
281
|
^^^^^
|
282
|
test/unit/issue_relation_test.rb:112:72: C: Rails/Date: Do not use Date.today without zone. Use Time.zone.today instead.
|
283
|
r = IssueRelation.new(:issue_from => Issue.new(:start_date => Date.today),
|
284
|
^^^^^
|
285
|
test/unit/issue_test.rb:722:67: C: Rails/Date: Do not use Date.today without zone. Use Time.zone.today instead.
|
286
|
issue = Issue.generate!(:tracker_id => 1, :start_date => Date.today, :due_date => Date.today)
|
287
|
^^^^^
|
288
|
test/unit/issue_test.rb:722:92: C: Rails/Date: Do not use Date.today without zone. Use Time.zone.today instead.
|
289
|
issue = Issue.generate!(:tracker_id => 1, :start_date => Date.today, :due_date => Date.today)
|
290
|
^^^^^
|
291
|
test/unit/issue_test.rb:737:65: C: Rails/Date: Do not use Date.today without zone. Use Time.zone.today instead.
|
292
|
issue = Issue.generate!(:tracker_id => 1, :due_date => Date.today)
|
293
|
^^^^^
|
294
|
test/unit/issue_test.rb:1129:29: C: Rails/Date: Do not use Date.today without zone. Use Time.zone.today instead.
|
295
|
issue.start_date = Date.today
|
296
|
^^^^^
|
297
|
test/unit/issue_test.rb:1971:17: C: Rails/Date: Do not use Date.today without zone. Use Time.zone.today instead.
|
298
|
date = Date.today
|
299
|
^^^^^
|
300
|
test/unit/issue_test.rb:1977:17: C: Rails/Date: Do not use Date.today without zone. Use Time.zone.today instead.
|
301
|
date = Date.today
|
302
|
^^^^^
|
303
|
test/unit/issue_test.rb:1989:17: C: Rails/Date: Do not use Date.today without zone. Use Time.zone.today instead.
|
304
|
date = Date.today
|
305
|
^^^^^
|
306
|
test/unit/issue_test.rb:2534:40: C: Rails/Date: Do not use Date.today without zone. Use Time.zone.today instead.
|
307
|
:due_date => Date.today,
|
308
|
^^^^^
|
309
|
test/unit/issue_test.rb:3335:17: C: [Correctable] Rails/TimeZone: Do not use Time.parse without zone. Use one of Time.zone.parse, Time.current, Time.parse.in_time_zone, Time.parse.utc, Time.parse.getlocal, Time.parse.xmlschema, Time.parse.iso8601, Time.parse.jisx0301, Time.parse.rfc3339, Time.parse.httpdate, Time.parse.to_i, Time.parse.to_f instead.
|
310
|
time = Time.parse '2016-03-20 20:00 UTC'
|
311
|
^^^^^
|
312
|
test/unit/lib/redmine/export/pdf/issues_pdf_test.rb:33:54: C: Rails/Date: Do not use Date.today without zone. Use Time.zone.today instead.
|
313
|
time_entry = TimeEntry.create!(:spent_on => Date.today, :hours => 4.3432, :user => user, :author => user,
|
314
|
^^^^^
|
315
|
test/unit/lib/redmine/helpers/calendar_test.rb:24:45: C: Rails/Date: Do not use Date.today without zone. Use Time.zone.today instead.
|
316
|
c = Redmine::Helpers::Calendar.new(Date.today, :fr, :month)
|
317
|
^^^^^
|
318
|
test/unit/lib/redmine/helpers/calendar_test.rb:30:45: C: Rails/Date: Do not use Date.today without zone. Use Time.zone.today instead.
|
319
|
c = Redmine::Helpers::Calendar.new(Date.today, :en, :month)
|
320
|
^^^^^
|
321
|
test/unit/lib/redmine/helpers/calendar_test.rb:35:45: C: Rails/Date: Do not use Date.today without zone. Use Time.zone.today instead.
|
322
|
c = Redmine::Helpers::Calendar.new(Date.today, :fr, :week)
|
323
|
^^^^^
|
324
|
test/unit/lib/redmine/helpers/calendar_test.rb:41:45: C: Rails/Date: Do not use Date.today without zone. Use Time.zone.today instead.
|
325
|
c = Redmine::Helpers::Calendar.new(Date.today, :en, :week)
|
326
|
^^^^^
|
327
|
test/unit/lib/redmine/helpers/calendar_test.rb:48:49: C: Rails/Date: Do not use Date.today without zone. Use Time.zone.today instead.
|
328
|
c = Redmine::Helpers::Calendar.new(Date.today, :en, :month)
|
329
|
^^^^^
|
330
|
test/unit/lib/redmine/helpers/calendar_test.rb:58:49: C: Rails/Date: Do not use Date.today without zone. Use Time.zone.today instead.
|
331
|
c = Redmine::Helpers::Calendar.new(Date.today, :en, :week)
|
332
|
^^^^^
|
333
|
test/unit/lib/redmine/helpers/gantt_test.rb:40:21: C: Rails/Date: Do not use Date.today without zone. Use Time.zone.today instead.
|
334
|
@today ||= Date.today
|
335
|
^^^^^
|
336
|
test/unit/lib/redmine/i18n_test.rb:36:18: C: Rails/Date: Do not use Date.today without zone. Use Time.zone.today instead.
|
337
|
today = Date.today
|
338
|
^^^^^
|
339
|
test/unit/lib/redmine/i18n_test.rb:44:18: C: Rails/Date: Do not use Date.today without zone. Use Time.zone.today instead.
|
340
|
today = Date.today
|
341
|
^^^^^
|
342
|
test/unit/lib/redmine/i18n_test.rb:63:28: C: Rails/Date: Do not use Date.today without zone. Use Time.zone.today instead.
|
343
|
format_date(Date.today)
|
344
|
^^^^^
|
345
|
test/unit/lib/redmine/i18n_test.rb:64:28: C: [Correctable] Rails/TimeZone: Do not use Time.now without zone. Use one of Time.zone.now, Time.current, Time.now.in_time_zone, Time.now.utc, Time.now.getlocal, Time.now.xmlschema, Time.now.iso8601, Time.now.jisx0301, Time.now.rfc3339, Time.now.httpdate, Time.now.to_i, Time.now.to_f instead.
|
346
|
format_time(Time.now)
|
347
|
^^^
|
348
|
test/unit/lib/redmine/i18n_test.rb:65:28: C: [Correctable] Rails/TimeZone: Do not use Time.now without zone. Use one of Time.zone.now, Time.current, Time.now.in_time_zone, Time.now.utc, Time.now.getlocal, Time.now.xmlschema, Time.now.iso8601, Time.now.jisx0301, Time.now.rfc3339, Time.now.httpdate, Time.now.to_i, Time.now.to_f instead.
|
349
|
format_time(Time.now, false)
|
350
|
^^^
|
351
|
test/unit/lib/redmine/i18n_test.rb:66:53: C: Rails/Date: Do not use Date.today without zone. Use Time.zone.today instead.
|
352
|
assert_not_equal 'default', ::I18n.l(Date.today, :format => :default),
|
353
|
^^^^^
|
354
|
test/unit/lib/redmine/i18n_test.rb:68:53: C: [Correctable] Rails/TimeZone: Do not use Time.now without zone. Use one of Time.zone.now, Time.current, Time.now.in_time_zone, Time.now.utc, Time.now.getlocal, Time.now.xmlschema, Time.now.iso8601, Time.now.jisx0301, Time.now.rfc3339, Time.now.httpdate, Time.now.to_i, Time.now.to_f instead.
|
355
|
assert_not_equal 'time', ::I18n.l(Time.now, :format => :time),
|
356
|
^^^
|
357
|
test/unit/lib/redmine/i18n_test.rb:84:26: C: [Correctable] Rails/TimeZone: Do not use Time.now without zone. Use one of Time.zone.now, Time.current, Time.now.in_time_zone, Time.now.utc, Time.now.getlocal, Time.now.xmlschema, Time.now.iso8601, Time.now.jisx0301, Time.now.rfc3339, Time.now.httpdate, Time.now.to_i, Time.now.to_f instead.
|
358
|
format_time(Time.now)
|
359
|
^^^
|
360
|
test/unit/lib/redmine/i18n_test.rb:91:16: C: [Correctable] Rails/TimeZone: Do not use Time.parse without zone. Use one of Time.zone.parse, Time.current, Time.parse.in_time_zone, Time.parse.utc, Time.parse.getlocal, Time.parse.xmlschema, Time.parse.iso8601, Time.parse.jisx0301, Time.parse.rfc3339, Time.parse.httpdate, Time.parse.to_i, Time.parse.to_f instead.
|
361
|
now = Time.parse('2011-02-20 15:45:22')
|
362
|
^^^^^
|
363
|
test/unit/lib/redmine/i18n_test.rb:106:16: C: [Correctable] Rails/TimeZone: Do not use Time.parse without zone. Use one of Time.zone.parse, Time.current, Time.parse.in_time_zone, Time.parse.utc, Time.parse.getlocal, Time.parse.xmlschema, Time.parse.iso8601, Time.parse.jisx0301, Time.parse.rfc3339, Time.parse.httpdate, Time.parse.to_i, Time.parse.to_f instead.
|
364
|
now = Time.parse('2011-02-20 15:45:22')
|
365
|
^^^^^
|
366
|
test/unit/lib/redmine/i18n_test.rb:121:16: C: [Correctable] Rails/TimeZone: Do not use Time.now without zone. Use one of Time.zone.now, Time.current, Time.now.in_time_zone, Time.now.utc, Time.now.getlocal, Time.now.xmlschema, Time.now.iso8601, Time.now.jisx0301, Time.now.rfc3339, Time.now.httpdate, Time.now.to_i, Time.now.to_f instead.
|
367
|
now = Time.now
|
368
|
^^^
|
369
|
test/unit/mail_handler_test.rb:304:25: C: Rails/Date: Do not use Date.today without zone. Use Time.zone.today instead.
|
370
|
assert_equal Date.today, issue.start_date
|
371
|
^^^^^
|
372
|
test/unit/mailer_test.rb:140:101: C: [Correctable] Rails/TimeZone: Do not use Time.now without zone. Use one of Time.zone.now, Time.current, Time.now.in_time_zone, Time.now.utc, Time.now.getlocal, Time.now.xmlschema, Time.now.iso8601, Time.now.jisx0301, Time.now.rfc3339, Time.now.httpdate, Time.now.to_i, Time.now.to_f instead.
|
373
|
journal = Journal.new(:journalized => Issue.find(1), :user => User.find(1), :created_on => Time.now)
|
374
|
^^^
|
375
|
test/unit/project_test.rb:918:62: C: Rails/Date: Do not use Date.today without zone. Use Time.zone.today instead.
|
376
|
Issue.generate!(:project => project, :start_date => Date.today)
|
377
|
^^^^^
|
378
|
test/unit/project_test.rb:942:60: C: Rails/Date: Do not use Date.today without zone. Use Time.zone.today instead.
|
379
|
Issue.generate!(:project => project, :due_date => Date.today)
|
380
|
^^^^^
|
381
|
test/unit/project_test.rb:951:67: C: Rails/Date: Do not use Date.today without zone. Use Time.zone.today instead.
|
382
|
project.versions << Version.generate!(:effective_date => Date.today)
|
383
|
^^^^^
|
384
|
test/unit/query_test.rb:576:53: C: Rails/Date: Do not use Date.today without zone. Use Time.zone.today instead.
|
385
|
Issue.find(7).update_attribute(:due_date, (Date.today + 15))
|
386
|
^^^^^
|
387
|
test/unit/query_test.rb:581:57: C: Rails/Date: Do not use Date.today without zone. Use Time.zone.today instead.
|
388
|
issues.each {|issue| assert(issue.due_date >= (Date.today + 15))}
|
389
|
^^^^^
|
390
|
test/unit/query_test.rb:589:57: C: Rails/Date: Do not use Date.today without zone. Use Time.zone.today instead.
|
391
|
issues.each {|issue| assert(issue.due_date <= (Date.today + 15))}
|
392
|
^^^^^
|
393
|
test/unit/query_test.rb:597:56: C: Rails/Date: Do not use Date.today without zone. Use Time.zone.today instead.
|
394
|
issues.each {|issue| assert(issue.due_date >= Date.today && issue.due_date <= (Date.today + 15))}
|
395
|
^^^^^
|
396
|
test/unit/query_test.rb:597:89: C: Rails/Date: Do not use Date.today without zone. Use Time.zone.today instead.
|
397
|
issues.each {|issue| assert(issue.due_date >= Date.today && issue.due_date <= (Date.today + 15))}
|
398
|
^^^^^
|
399
|
test/unit/query_test.rb:601:53: C: Rails/Date: Do not use Date.today without zone. Use Time.zone.today instead.
|
400
|
Issue.find(7).update_attribute(:due_date, (Date.today - 3))
|
401
|
^^^^^
|
402
|
test/unit/query_test.rb:606:57: C: Rails/Date: Do not use Date.today without zone. Use Time.zone.today instead.
|
403
|
issues.each {|issue| assert(issue.due_date >= (Date.today - 3))}
|
404
|
^^^^^
|
405
|
test/unit/query_test.rb:610:53: C: Rails/Date: Do not use Date.today without zone. Use Time.zone.today instead.
|
406
|
Issue.find(7).update_attribute(:due_date, (Date.today - 3))
|
407
|
^^^^^
|
408
|
test/unit/query_test.rb:615:57: C: Rails/Date: Do not use Date.today without zone. Use Time.zone.today instead.
|
409
|
issues.each {|issue| assert(issue.due_date >= (Date.today - 3) && issue.due_date <= Date.today)}
|
410
|
^^^^^
|
411
|
test/unit/query_test.rb:615:94: C: Rails/Date: Do not use Date.today without zone. Use Time.zone.today instead.
|
412
|
issues.each {|issue| assert(issue.due_date >= (Date.today - 3) && issue.due_date <= Date.today)}
|
413
|
^^^^^
|
414
|
test/unit/query_test.rb:619:53: C: Rails/Date: Do not use Date.today without zone. Use Time.zone.today instead.
|
415
|
Issue.find(7).update_attribute(:due_date, (Date.today - 10))
|
416
|
^^^^^
|
417
|
test/unit/query_test.rb:625:57: C: Rails/Date: Do not use Date.today without zone. Use Time.zone.today instead.
|
418
|
issues.each {|issue| assert(issue.due_date <= (Date.today - 10))}
|
419
|
^^^^^
|
420
|
test/unit/query_test.rb:629:53: C: Rails/Date: Do not use Date.today without zone. Use Time.zone.today instead.
|
421
|
Issue.find(7).update_attribute(:due_date, (Date.today + 2))
|
422
|
^^^^^
|
423
|
test/unit/query_test.rb:634:45: C: Rails/Date: Do not use Date.today without zone. Use Time.zone.today instead.
|
424
|
issues.each {|issue| assert_equal((Date.today + 2), issue.due_date)}
|
425
|
^^^^^
|
426
|
test/unit/query_test.rb:638:53: C: Rails/Date: Do not use Date.today without zone. Use Time.zone.today instead.
|
427
|
Issue.find(7).update_attribute(:due_date, (Date.today - 3))
|
428
|
^^^^^
|
429
|
test/unit/query_test.rb:643:45: C: Rails/Date: Do not use Date.today without zone. Use Time.zone.today instead.
|
430
|
issues.each {|issue| assert_equal((Date.today - 3), issue.due_date)}
|
431
|
^^^^^
|
432
|
test/unit/query_test.rb:651:44: C: Rails/Date: Do not use Date.today without zone. Use Time.zone.today instead.
|
433
|
issues.each {|issue| assert_equal Date.today, issue.due_date}
|
434
|
^^^^^
|
435
|
test/unit/repository_git_test.rb:220:47: C: [Correctable] Rails/TimeZone: Do not use Time.now without zone. Use one of Time.zone.now, Time.current, Time.now.in_time_zone, Time.now.utc, Time.now.getlocal, Time.now.xmlschema, Time.now.iso8601, Time.now.jisx0301, Time.now.rfc3339, Time.now.httpdate, Time.now.to_i, Time.now.to_f instead.
|
436
|
:committed_on => Time.now,
|
437
|
^^^
|
438
|
test/unit/repository_git_test.rb:533:47: C: [Correctable] Rails/TimeZone: Do not use Time.now without zone. Use one of Time.zone.now, Time.current, Time.now.in_time_zone, Time.now.utc, Time.now.getlocal, Time.now.xmlschema, Time.now.iso8601, Time.now.jisx0301, Time.now.rfc3339, Time.now.httpdate, Time.now.to_i, Time.now.to_f instead.
|
439
|
:committed_on => Time.now,
|
440
|
^^^
|
441
|
test/unit/repository_mercurial_test.rb:198:47: C: [Correctable] Rails/TimeZone: Do not use Time.now without zone. Use one of Time.zone.now, Time.current, Time.now.in_time_zone, Time.now.utc, Time.now.getlocal, Time.now.xmlschema, Time.now.iso8601, Time.now.jisx0301, Time.now.rfc3339, Time.now.httpdate, Time.now.to_i, Time.now.to_f instead.
|
442
|
:committed_on => Time.now,
|
443
|
^^^
|
444
|
test/unit/repository_mercurial_test.rb:492:47: C: [Correctable] Rails/TimeZone: Do not use Time.now without zone. Use one of Time.zone.now, Time.current, Time.now.in_time_zone, Time.now.utc, Time.now.getlocal, Time.now.xmlschema, Time.now.iso8601, Time.now.jisx0301, Time.now.rfc3339, Time.now.httpdate, Time.now.to_i, Time.now.to_f instead.
|
445
|
:committed_on => Time.now,
|
446
|
^^^
|
447
|
test/unit/repository_mercurial_test.rb:550:47: C: [Correctable] Rails/TimeZone: Do not use Time.now without zone. Use one of Time.zone.now, Time.current, Time.now.in_time_zone, Time.now.utc, Time.now.getlocal, Time.now.xmlschema, Time.now.iso8601, Time.now.jisx0301, Time.now.rfc3339, Time.now.httpdate, Time.now.to_i, Time.now.to_f instead.
|
448
|
:committed_on => Time.now,
|
449
|
^^^
|
450
|
test/unit/repository_mercurial_test.rb:619:47: C: [Correctable] Rails/TimeZone: Do not use Time.now without zone. Use one of Time.zone.now, Time.current, Time.now.in_time_zone, Time.now.utc, Time.now.getlocal, Time.now.xmlschema, Time.now.iso8601, Time.now.jisx0301, Time.now.rfc3339, Time.now.httpdate, Time.now.to_i, Time.now.to_f instead.
|
451
|
:committed_on => Time.now,
|
452
|
^^^
|
453
|
test/unit/repository_mercurial_test.rb:641:47: C: [Correctable] Rails/TimeZone: Do not use Time.now without zone. Use one of Time.zone.now, Time.current, Time.now.in_time_zone, Time.now.utc, Time.now.getlocal, Time.now.xmlschema, Time.now.iso8601, Time.now.jisx0301, Time.now.rfc3339, Time.now.httpdate, Time.now.to_i, Time.now.to_f instead.
|
454
|
:committed_on => Time.now,
|
455
|
^^^
|
456
|
test/unit/repository_subversion_test.rb:206:75: C: [Correctable] Rails/TimeZone: Do not use Time.now without zone. Use one of Time.zone.now, Time.current, Time.now.in_time_zone, Time.now.utc, Time.now.getlocal, Time.now.xmlschema, Time.now.iso8601, Time.now.jisx0301, Time.now.rfc3339, Time.now.httpdate, Time.now.to_i, Time.now.to_f instead.
|
457
|
c = Changeset.new(:repository => @repository, :committed_on => Time.now,
|
458
|
^^^
|
459
|
test/unit/repository_subversion_test.rb:221:75: C: [Correctable] Rails/TimeZone: Do not use Time.now without zone. Use one of Time.zone.now, Time.current, Time.now.in_time_zone, Time.now.utc, Time.now.getlocal, Time.now.xmlschema, Time.now.iso8601, Time.now.jisx0301, Time.now.rfc3339, Time.now.httpdate, Time.now.to_i, Time.now.to_f instead.
|
460
|
c = Changeset.new(:repository => @repository, :committed_on => Time.now,
|
461
|
^^^
|
462
|
test/unit/repository_subversion_test.rb:227:75: C: [Correctable] Rails/TimeZone: Do not use Time.now without zone. Use one of Time.zone.now, Time.current, Time.now.in_time_zone, Time.now.utc, Time.now.getlocal, Time.now.xmlschema, Time.now.iso8601, Time.now.jisx0301, Time.now.rfc3339, Time.now.httpdate, Time.now.to_i, Time.now.to_f instead.
|
463
|
c = Changeset.new(:repository => @repository, :committed_on => Time.now,
|
464
|
^^^
|
465
|
test/unit/repository_subversion_test.rb:234:75: C: [Correctable] Rails/TimeZone: Do not use Time.now without zone. Use one of Time.zone.now, Time.current, Time.now.in_time_zone, Time.now.utc, Time.now.getlocal, Time.now.xmlschema, Time.now.iso8601, Time.now.jisx0301, Time.now.rfc3339, Time.now.httpdate, Time.now.to_i, Time.now.to_f instead.
|
466
|
c = Changeset.new(:repository => @repository, :committed_on => Time.now,
|
467
|
^^^
|
468
|
test/unit/repository_subversion_test.rb:246:49: C: [Correctable] Rails/TimeZone: Do not use Time.now without zone. Use one of Time.zone.now, Time.current, Time.now.in_time_zone, Time.now.utc, Time.now.getlocal, Time.now.xmlschema, Time.now.iso8601, Time.now.jisx0301, Time.now.rfc3339, Time.now.httpdate, Time.now.to_i, Time.now.to_f instead.
|
469
|
:committed_on => Time.now)
|
470
|
^^^
|
471
|
test/unit/repository_test.rb:315:50: C: [Correctable] Rails/TimeZone: Do not use Time.now without zone. Use one of Time.zone.now, Time.current, Time.now.in_time_zone, Time.now.utc, Time.now.getlocal, Time.now.xmlschema, Time.now.iso8601, Time.now.jisx0301, Time.now.rfc3339, Time.now.httpdate, Time.now.to_i, Time.now.to_f instead.
|
472
|
:comments => comment, :commit_date => Time.now,
|
473
|
^^^
|
474
|
test/unit/repository_test.rb:318:29: C: [Correctable] Rails/TimeZone: Do not use Time.now without zone. Use one of Time.zone.now, Time.current, Time.now.in_time_zone, Time.now.utc, Time.now.getlocal, Time.now.xmlschema, Time.now.iso8601, Time.now.jisx0301, Time.now.rfc3339, Time.now.httpdate, Time.now.to_i, Time.now.to_f instead.
|
475
|
:committed_on => Time.now, :repository => repository)
|
476
|
^^^
|
477
|
test/unit/repository_test.rb:372:37: C: [Correctable] Rails/TimeZone: Do not use Time.now without zone. Use one of Time.zone.now, Time.current, Time.now.in_time_zone, Time.now.utc, Time.now.getlocal, Time.now.xmlschema, Time.now.iso8601, Time.now.jisx0301, Time.now.rfc3339, Time.now.httpdate, Time.now.to_i, Time.now.to_f instead.
|
478
|
:committed_on => Time.now,
|
479
|
^^^
|
480
|
test/unit/repository_test.rb:384:37: C: [Correctable] Rails/TimeZone: Do not use Time.now without zone. Use one of Time.zone.now, Time.current, Time.now.in_time_zone, Time.now.utc, Time.now.getlocal, Time.now.xmlschema, Time.now.iso8601, Time.now.jisx0301, Time.now.rfc3339, Time.now.httpdate, Time.now.to_i, Time.now.to_f instead.
|
481
|
:committed_on => Time.now,
|
482
|
^^^
|
483
|
test/unit/repository_test.rb:397:34: C: [Correctable] Rails/TimeZone: Do not use Time.now without zone. Use one of Time.zone.now, Time.current, Time.now.in_time_zone, Time.now.utc, Time.now.getlocal, Time.now.xmlschema, Time.now.iso8601, Time.now.jisx0301, Time.now.rfc3339, Time.now.httpdate, Time.now.to_i, Time.now.to_f instead.
|
484
|
:committed_on => Time.now,
|
485
|
^^^
|
486
|
test/unit/repository_test.rb:409:35: C: [Correctable] Rails/TimeZone: Do not use Time.now without zone. Use one of Time.zone.now, Time.current, Time.now.in_time_zone, Time.now.utc, Time.now.getlocal, Time.now.xmlschema, Time.now.iso8601, Time.now.jisx0301, Time.now.rfc3339, Time.now.httpdate, Time.now.to_i, Time.now.to_f instead.
|
487
|
:committed_on => Time.now,
|
488
|
^^^
|
489
|
test/unit/repository_test.rb:483:29: C: [Correctable] Rails/TimeZone: Do not use Time.now without zone. Use one of Time.zone.now, Time.current, Time.now.in_time_zone, Time.now.utc, Time.now.getlocal, Time.now.xmlschema, Time.now.iso8601, Time.now.jisx0301, Time.now.rfc3339, Time.now.httpdate, Time.now.to_i, Time.now.to_f instead.
|
490
|
:committed_on => Time.now,
|
491
|
^^^
|
492
|
test/unit/repository_test.rb:507:29: C: [Correctable] Rails/TimeZone: Do not use Time.now without zone. Use one of Time.zone.now, Time.current, Time.now.in_time_zone, Time.now.utc, Time.now.getlocal, Time.now.xmlschema, Time.now.iso8601, Time.now.jisx0301, Time.now.rfc3339, Time.now.httpdate, Time.now.to_i, Time.now.to_f instead.
|
493
|
:committed_on => Time.now,
|
494
|
^^^
|
495
|
test/unit/repository_test.rb:530:29: C: [Correctable] Rails/TimeZone: Do not use Time.now without zone. Use one of Time.zone.now, Time.current, Time.now.in_time_zone, Time.now.utc, Time.now.getlocal, Time.now.xmlschema, Time.now.iso8601, Time.now.jisx0301, Time.now.rfc3339, Time.now.httpdate, Time.now.to_i, Time.now.to_f instead.
|
496
|
:committed_on => Time.now,
|
497
|
^^^
|
498
|
test/unit/time_entry_test.rb:172:23: C: Rails/Date: Do not use Date.today without zone. Use Time.zone.today instead.
|
499
|
c.spent_on = Date.today
|
500
|
^^^^^
|
501
|
test/unit/time_entry_test.rb:173:23: C: Rails/Date: Do not use Date.today without zone. Use Time.zone.today instead.
|
502
|
assert_equal Date.today, c.spent_on
|
503
|
^^^^^
|
504
|
test/unit/time_entry_test.rb:178:23: C: [Correctable] Rails/TimeZone: Do not use Time.now without zone. Use one of Time.zone.now, Time.current, Time.now.in_time_zone, Time.now.utc, Time.now.getlocal, Time.now.xmlschema, Time.now.iso8601, Time.now.jisx0301, Time.now.rfc3339, Time.now.httpdate, Time.now.to_i, Time.now.to_f instead.
|
505
|
c.spent_on = Time.now
|
506
|
^^^
|
507
|
test/unit/time_entry_test.rb:203:45: C: Rails/Date: Do not use Date.today without zone. Use Time.zone.today instead.
|
508
|
entry = TimeEntry.new(:spent_on => Date.today, :hours => 1.0, :user => User.find(1), :project_id => 1, :activity => activity)
|
509
|
^^^^^
|
510
|
test/unit/time_entry_test.rb:235:47: C: Rails/Date: Do not use Date.today without zone. Use Time.zone.today instead.
|
511
|
:spent_on => Date.today,
|
512
|
^^^^^
|
513
|
test/unit/user_test.rb:390:60: C: Rails/Date: Do not use Date.today without zone. Use Time.zone.today instead.
|
514
|
entry = TimeEntry.new(:hours => '2', :spent_on => Date.today,
|
515
|
^^^^^
|
516
|
test/unit/user_test.rb:460:33: C: [Correctable] Rails/TimeZone: Do not use Time.now without zone. Use one of Time.zone.now, Time.current, Time.now.in_time_zone, Time.now.utc, Time.now.getlocal, Time.now.xmlschema, Time.now.iso8601, Time.now.jisx0301, Time.now.rfc3339, Time.now.httpdate, Time.now.to_i, Time.now.to_f instead.
|
517
|
:committed_on => Time.now,
|
518
|
^^^
|
519
|
test/unit/user_test.rb:613:25: C: [Correctable] Rails/TimeZone: Do not use Time.new without zone. Use one of Time.zone.local, Time.current, Time.new.in_time_zone, Time.new.utc, Time.new.getlocal, Time.new.xmlschema, Time.new.iso8601, Time.new.jisx0301, Time.new.rfc3339, Time.new.httpdate, Time.new.to_i, Time.new.to_f instead.
|
520
|
time_not_utc = Time.new(2012, 05, 15, 23, 30)
|
521
|
^^^
|
522
|
test/unit/version_test.rb:161:73: C: Rails/Date: Do not use Date.today without zone. Use Time.zone.today instead.
|
523
|
version = Version.create!(:project_id => 1, :effective_date => Date.today, :name => 'Due today')
|
524
|
^^^^^
|
525
|
|
526
|
973 files inspected, 173 offenses detected, 102 offenses auto-correctable
|