Project

General

Profile

Defect #33941 » RuboCop-RailsTimezone-RailsDate-offenses.txt

Go MAEDA, 2021-03-31 04:58

 
Inspecting 973 files
..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.........

Offenses:

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.
user.last_login_on = Time.now
^^^
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.
l(:label_updated_time, distance_of_time_in_words(Time.now, page.updated_on))
^^^
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.
text = distance_of_time_in_words(Time.now, time)
^^^
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.
Attachment.where("created_on < ? AND (container_type IS NULL OR container_type = '')", Time.now - age).destroy_all
^^^
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.
started_on = Time.now
^^^
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.
if (max_items && imported >= max_items) || (max_time && Time.now >= started_on + max_time)
^^^
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.
Time.local y, m, d
^^^^^
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.
Time.parse(arg) rescue nil
^^^^^
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.
@cached_cleared_on = Time.now
^^^
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.
@cached_cleared_on = Time.now
^^^
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.
Time.now - validity_time
^^^
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.
update_column(:last_login_on, Time.now)
^^^
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.
self.passwd_changed_on = Time.now.change(:usec => 0)
^^^
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.
changed_on = self.passwd_changed_on || Time.at(0)
^^
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.
scope.update_all(:updated_on => Time.now) == 1
^^^
app/models/user.rb:581:12: C: Rails/Date: Do not use Date.today without zone. Use Time.zone.today instead.
Date.today
^^^^^
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.
xml.updated((@items.first ? @items.first.event_datetime : Time.now).xmlschema)
^^^
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.
xml.updated((@journals.first ? @journals.first.event_datetime : Time.now).xmlschema)
^^^
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.
n = EmailAddress.connection.quoted_date(Time.now)
^^^
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.
date_from = @from.to_time
^^^^^^^
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.
while date_from <= @to.to_time && @periods.length < 100
^^^^^^^
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.
time = time.to_time if time.is_a?(String)
^^^^^^^
lib/redmine/scm/adapters/bazaar_adapter.rb:156:40: C: [Correctable] Rails/TimeZone: Do not use Time.localtime without offset or zone.
revision.time = Time.parse($1).localtime
^^^^^
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.
Time.parse(
^^^^^
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.
date = Time.parse($1)
^^^^^
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.
time = Time.now if (time.is_a?(String) && time == 'HEAD')
^^^
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.
time = Time.parse(time)
^^^^^
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.
time = Time.parse(lines[4].match('CommitDate:\s+(.*)$')[1])
^^^^^
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.
:time => Time.parse(changeset[:date]),
^^^^^
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.
:time => Time.parse(changeset[:date]),
^^^^^
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.
:time => Time.at(e['time'].to_i))
^^
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.
:time => Time.parse(le['date']['__content__']),
^^^^^
lib/redmine/scm/adapters/subversion_adapter.rb:79:39: C: [Correctable] Rails/TimeZone: Do not use Time.localtime without offset or zone.
:time => Time.parse(doc['info']['entry']['commit']['date']['__content__']).localtime,
^^^^^
lib/redmine/scm/adapters/subversion_adapter.rb:126:43: C: [Correctable] Rails/TimeZone: Do not use Time.localtime without offset or zone.
:time => Time.parse(commit_date['__content__'].to_s).localtime,
^^^^^
lib/redmine/scm/adapters/subversion_adapter.rb:201:37: C: [Correctable] Rails/TimeZone: Do not use Time.localtime without offset or zone.
:time => Time.parse(logentry['date']['__content__'].to_s).localtime,
^^^^^
test/functional/issue_relations_controller_test.rb:159:48: C: Rails/Date: Do not use Date.today without zone. Use Time.zone.today instead.
:due_date => Date.today)
^^^^^
test/functional/issues_controller_test.rb:914:27: C: Rails/Date: Do not use Date.today without zone. Use Time.zone.today instead.
:spent_on => Date.today
^^^^^
test/functional/issues_controller_test.rb:3557:26: C: Rails/Date: Do not use Date.today without zone. Use Time.zone.today instead.
Date.today.to_s
^^^^^
test/functional/issues_controller_test.rb:4007:25: C: Rails/Date: Do not use Date.today without zone. Use Time.zone.today instead.
assert_equal Date.today, issue.start_date
^^^^^
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.
:committed_on => Time.now,
^^^
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.
:committed_on => Time.now,
^^^
test/functional/timelog_report_test.rb:119:134: C: Rails/Date: Do not use Date.today without zone. Use Time.zone.today instead.
entry = TimeEntry.create!(:project => Project.find(1), :hours => 1, :activity_id => 10, :user => User.find(2), :spent_on => Date.today)
^^^^^
test/functional/versions_controller_test.rb:296:33: C: Rails/Date: Do not use Date.today without zone. Use Time.zone.today instead.
:effective_date => Date.today.strftime("%Y-%m-%d")
^^^^^
test/functional/versions_controller_test.rb:303:23: C: Rails/Date: Do not use Date.today without zone. Use Time.zone.today instead.
assert_equal Date.today, version.effective_date
^^^^^
test/functional/versions_controller_test.rb:312:33: C: Rails/Date: Do not use Date.today without zone. Use Time.zone.today instead.
:effective_date => Date.today.strftime("%Y-%m-%d")
^^^^^
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.
@event_datetime = Time.now + @@count.hours
^^^
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.
Changeset.create!(:repository => svn, :committed_on => Time.now, :revision => '123')
^^^
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.
Changeset.create!(:repository => hg, :committed_on => Time.now, :revision => '123', :scmid => 'abcd')
^^^
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.
Changeset.create!(:repository => svn, :committed_on => Time.now, :revision => '123')
^^^
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.
Changeset.create!(:repository => hg, :committed_on => Time.now, :revision => '123', :scmid => 'abcd')
^^^
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.
:committed_on => Time.now,
^^^
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.
:committed_on => Time.now,
^^^
test/helpers/application_helper_test.rb:1629:12: C: Rails/Date: Do not use Date.today without zone. Use Time.zone.today instead.
Date.today => 'Due in 0 days',
^^^^^
test/helpers/application_helper_test.rb:1630:12: C: Rails/Date: Do not use Date.today without zone. Use Time.zone.today instead.
Date.today + 1 => 'Due in 1 day',
^^^^^
test/helpers/application_helper_test.rb:1631:12: C: Rails/Date: Do not use Date.today without zone. Use Time.zone.today instead.
Date.today + 100 => 'Due in about 3 months',
^^^^^
test/helpers/application_helper_test.rb:1632:12: C: Rails/Date: Do not use Date.today without zone. Use Time.zone.today instead.
Date.today + 20000 => 'Due in over 54 years',
^^^^^
test/helpers/application_helper_test.rb:1633:12: C: Rails/Date: Do not use Date.today without zone. Use Time.zone.today instead.
Date.today - 1 => '1 day late',
^^^^^
test/helpers/application_helper_test.rb:1634:12: C: Rails/Date: Do not use Date.today without zone. Use Time.zone.today instead.
Date.today - 100 => 'about 3 months late',
^^^^^
test/helpers/application_helper_test.rb:1635:12: C: Rails/Date: Do not use Date.today without zone. Use Time.zone.today instead.
Date.today - 20000 => 'over 54 years late',
^^^^^
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.
distance_of_time_in_words(Time.now, parent_page.updated_on)))
^^^
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.
distance_of_time_in_words(Time.now, child_page.updated_on)))
^^^
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.
travel_to Time.parse('2019-06-01 23:00:00 UTC') do
^^^^^
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.
Issue.generate!(:subject => '1').update_column(:updated_on, Time.parse("2014-01-02T10:25:00Z"))
^^^^^
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.
Issue.generate!(:subject => '2').update_column(:updated_on, Time.parse("2014-01-02T12:13:00Z"))
^^^^^
test/object_helpers.rb:153:29: C: Rails/Date: Do not use Date.today without zone. Use Time.zone.today instead.
entry.spent_on ||= Date.today
^^^^^
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.
changeset.committed_on ||= Time.now
^^^
test/unit/activity_test.rb:198:63: C: Rails/Date: Do not use Date.today without zone. Use Time.zone.today instead.
Redmine::Activity::Fetcher.new(user, options).events(Date.today - 30, Date.today + 1)
^^^^^
test/unit/activity_test.rb:198:80: C: Rails/Date: Do not use Date.today without zone. Use Time.zone.today instead.
Redmine::Activity::Fetcher.new(user, options).events(Date.today - 30, Date.today + 1)
^^^^^
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.
:committed_on => Time.now,
^^^
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.
:committed_on => Time.now,
^^^
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.
:committed_on => Time.now,
^^^
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.
:committed_on => Time.now,
^^^
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.
:committed_on => Time.now,
^^^
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.
:committed_on => Time.now,
^^^
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.
:committed_on => Time.now,
^^^
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.
:committed_on => Time.now,
^^^
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.
:committed_on => Time.now,
^^^
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.
:committed_on => Time.now,
^^^
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.
:committed_on => Time.now,
^^^
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.
:committed_on => Time.now,
^^^
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.
:committed_on => Time.now,
^^^
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.
repository.created_on = Time.now
^^^
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.
now = Time.now
^^^
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.
:committed_on => Time.now,
^^^
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.
:committed_on => Time.now,
^^^
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.
:committed_on => Time.now,
^^^
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.
:committed_on => Time.now,
^^^
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.
:committed_on => Time.now,
^^^
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.
:committed_on => Time.now,
^^^
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.
:committed_on => Time.now,
^^^
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.
:committed_on => Time.now,
^^^
test/unit/issue_nested_set_test.rb:254:48: C: Rails/Date: Do not use Date.today without zone. Use Time.zone.today instead.
parent.generate_child!(:start_date => Date.today)
^^^^^
test/unit/issue_relation_test.rb:112:72: C: Rails/Date: Do not use Date.today without zone. Use Time.zone.today instead.
r = IssueRelation.new(:issue_from => Issue.new(:start_date => Date.today),
^^^^^
test/unit/issue_test.rb:722:67: C: Rails/Date: Do not use Date.today without zone. Use Time.zone.today instead.
issue = Issue.generate!(:tracker_id => 1, :start_date => Date.today, :due_date => Date.today)
^^^^^
test/unit/issue_test.rb:722:92: C: Rails/Date: Do not use Date.today without zone. Use Time.zone.today instead.
issue = Issue.generate!(:tracker_id => 1, :start_date => Date.today, :due_date => Date.today)
^^^^^
test/unit/issue_test.rb:737:65: C: Rails/Date: Do not use Date.today without zone. Use Time.zone.today instead.
issue = Issue.generate!(:tracker_id => 1, :due_date => Date.today)
^^^^^
test/unit/issue_test.rb:1129:29: C: Rails/Date: Do not use Date.today without zone. Use Time.zone.today instead.
issue.start_date = Date.today
^^^^^
test/unit/issue_test.rb:1971:17: C: Rails/Date: Do not use Date.today without zone. Use Time.zone.today instead.
date = Date.today
^^^^^
test/unit/issue_test.rb:1977:17: C: Rails/Date: Do not use Date.today without zone. Use Time.zone.today instead.
date = Date.today
^^^^^
test/unit/issue_test.rb:1989:17: C: Rails/Date: Do not use Date.today without zone. Use Time.zone.today instead.
date = Date.today
^^^^^
test/unit/issue_test.rb:2534:40: C: Rails/Date: Do not use Date.today without zone. Use Time.zone.today instead.
:due_date => Date.today,
^^^^^
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.
time = Time.parse '2016-03-20 20:00 UTC'
^^^^^
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.
time_entry = TimeEntry.create!(:spent_on => Date.today, :hours => 4.3432, :user => user, :author => user,
^^^^^
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.
c = Redmine::Helpers::Calendar.new(Date.today, :fr, :month)
^^^^^
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.
c = Redmine::Helpers::Calendar.new(Date.today, :en, :month)
^^^^^
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.
c = Redmine::Helpers::Calendar.new(Date.today, :fr, :week)
^^^^^
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.
c = Redmine::Helpers::Calendar.new(Date.today, :en, :week)
^^^^^
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.
c = Redmine::Helpers::Calendar.new(Date.today, :en, :month)
^^^^^
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.
c = Redmine::Helpers::Calendar.new(Date.today, :en, :week)
^^^^^
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.
@today ||= Date.today
^^^^^
test/unit/lib/redmine/i18n_test.rb:36:18: C: Rails/Date: Do not use Date.today without zone. Use Time.zone.today instead.
today = Date.today
^^^^^
test/unit/lib/redmine/i18n_test.rb:44:18: C: Rails/Date: Do not use Date.today without zone. Use Time.zone.today instead.
today = Date.today
^^^^^
test/unit/lib/redmine/i18n_test.rb:63:28: C: Rails/Date: Do not use Date.today without zone. Use Time.zone.today instead.
format_date(Date.today)
^^^^^
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.
format_time(Time.now)
^^^
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.
format_time(Time.now, false)
^^^
test/unit/lib/redmine/i18n_test.rb:66:53: C: Rails/Date: Do not use Date.today without zone. Use Time.zone.today instead.
assert_not_equal 'default', ::I18n.l(Date.today, :format => :default),
^^^^^
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.
assert_not_equal 'time', ::I18n.l(Time.now, :format => :time),
^^^
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.
format_time(Time.now)
^^^
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.
now = Time.parse('2011-02-20 15:45:22')
^^^^^
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.
now = Time.parse('2011-02-20 15:45:22')
^^^^^
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.
now = Time.now
^^^
test/unit/mail_handler_test.rb:304:25: C: Rails/Date: Do not use Date.today without zone. Use Time.zone.today instead.
assert_equal Date.today, issue.start_date
^^^^^
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.
journal = Journal.new(:journalized => Issue.find(1), :user => User.find(1), :created_on => Time.now)
^^^
test/unit/project_test.rb:918:62: C: Rails/Date: Do not use Date.today without zone. Use Time.zone.today instead.
Issue.generate!(:project => project, :start_date => Date.today)
^^^^^
test/unit/project_test.rb:942:60: C: Rails/Date: Do not use Date.today without zone. Use Time.zone.today instead.
Issue.generate!(:project => project, :due_date => Date.today)
^^^^^
test/unit/project_test.rb:951:67: C: Rails/Date: Do not use Date.today without zone. Use Time.zone.today instead.
project.versions << Version.generate!(:effective_date => Date.today)
^^^^^
test/unit/query_test.rb:576:53: C: Rails/Date: Do not use Date.today without zone. Use Time.zone.today instead.
Issue.find(7).update_attribute(:due_date, (Date.today + 15))
^^^^^
test/unit/query_test.rb:581:57: C: Rails/Date: Do not use Date.today without zone. Use Time.zone.today instead.
issues.each {|issue| assert(issue.due_date >= (Date.today + 15))}
^^^^^
test/unit/query_test.rb:589:57: C: Rails/Date: Do not use Date.today without zone. Use Time.zone.today instead.
issues.each {|issue| assert(issue.due_date <= (Date.today + 15))}
^^^^^
test/unit/query_test.rb:597:56: C: Rails/Date: Do not use Date.today without zone. Use Time.zone.today instead.
issues.each {|issue| assert(issue.due_date >= Date.today && issue.due_date <= (Date.today + 15))}
^^^^^
test/unit/query_test.rb:597:89: C: Rails/Date: Do not use Date.today without zone. Use Time.zone.today instead.
issues.each {|issue| assert(issue.due_date >= Date.today && issue.due_date <= (Date.today + 15))}
^^^^^
test/unit/query_test.rb:601:53: C: Rails/Date: Do not use Date.today without zone. Use Time.zone.today instead.
Issue.find(7).update_attribute(:due_date, (Date.today - 3))
^^^^^
test/unit/query_test.rb:606:57: C: Rails/Date: Do not use Date.today without zone. Use Time.zone.today instead.
issues.each {|issue| assert(issue.due_date >= (Date.today - 3))}
^^^^^
test/unit/query_test.rb:610:53: C: Rails/Date: Do not use Date.today without zone. Use Time.zone.today instead.
Issue.find(7).update_attribute(:due_date, (Date.today - 3))
^^^^^
test/unit/query_test.rb:615:57: C: Rails/Date: Do not use Date.today without zone. Use Time.zone.today instead.
issues.each {|issue| assert(issue.due_date >= (Date.today - 3) && issue.due_date <= Date.today)}
^^^^^
test/unit/query_test.rb:615:94: C: Rails/Date: Do not use Date.today without zone. Use Time.zone.today instead.
issues.each {|issue| assert(issue.due_date >= (Date.today - 3) && issue.due_date <= Date.today)}
^^^^^
test/unit/query_test.rb:619:53: C: Rails/Date: Do not use Date.today without zone. Use Time.zone.today instead.
Issue.find(7).update_attribute(:due_date, (Date.today - 10))
^^^^^
test/unit/query_test.rb:625:57: C: Rails/Date: Do not use Date.today without zone. Use Time.zone.today instead.
issues.each {|issue| assert(issue.due_date <= (Date.today - 10))}
^^^^^
test/unit/query_test.rb:629:53: C: Rails/Date: Do not use Date.today without zone. Use Time.zone.today instead.
Issue.find(7).update_attribute(:due_date, (Date.today + 2))
^^^^^
test/unit/query_test.rb:634:45: C: Rails/Date: Do not use Date.today without zone. Use Time.zone.today instead.
issues.each {|issue| assert_equal((Date.today + 2), issue.due_date)}
^^^^^
test/unit/query_test.rb:638:53: C: Rails/Date: Do not use Date.today without zone. Use Time.zone.today instead.
Issue.find(7).update_attribute(:due_date, (Date.today - 3))
^^^^^
test/unit/query_test.rb:643:45: C: Rails/Date: Do not use Date.today without zone. Use Time.zone.today instead.
issues.each {|issue| assert_equal((Date.today - 3), issue.due_date)}
^^^^^
test/unit/query_test.rb:651:44: C: Rails/Date: Do not use Date.today without zone. Use Time.zone.today instead.
issues.each {|issue| assert_equal Date.today, issue.due_date}
^^^^^
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.
:committed_on => Time.now,
^^^
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.
:committed_on => Time.now,
^^^
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.
:committed_on => Time.now,
^^^
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.
:committed_on => Time.now,
^^^
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.
:committed_on => Time.now,
^^^
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.
:committed_on => Time.now,
^^^
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.
:committed_on => Time.now,
^^^
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.
c = Changeset.new(:repository => @repository, :committed_on => Time.now,
^^^
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.
c = Changeset.new(:repository => @repository, :committed_on => Time.now,
^^^
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.
c = Changeset.new(:repository => @repository, :committed_on => Time.now,
^^^
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.
c = Changeset.new(:repository => @repository, :committed_on => Time.now,
^^^
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.
:committed_on => Time.now)
^^^
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.
:comments => comment, :commit_date => Time.now,
^^^
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.
:committed_on => Time.now, :repository => repository)
^^^
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.
:committed_on => Time.now,
^^^
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.
:committed_on => Time.now,
^^^
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.
:committed_on => Time.now,
^^^
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.
:committed_on => Time.now,
^^^
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.
:committed_on => Time.now,
^^^
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.
:committed_on => Time.now,
^^^
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.
:committed_on => Time.now,
^^^
test/unit/time_entry_test.rb:172:23: C: Rails/Date: Do not use Date.today without zone. Use Time.zone.today instead.
c.spent_on = Date.today
^^^^^
test/unit/time_entry_test.rb:173:23: C: Rails/Date: Do not use Date.today without zone. Use Time.zone.today instead.
assert_equal Date.today, c.spent_on
^^^^^
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.
c.spent_on = Time.now
^^^
test/unit/time_entry_test.rb:203:45: C: Rails/Date: Do not use Date.today without zone. Use Time.zone.today instead.
entry = TimeEntry.new(:spent_on => Date.today, :hours => 1.0, :user => User.find(1), :project_id => 1, :activity => activity)
^^^^^
test/unit/time_entry_test.rb:235:47: C: Rails/Date: Do not use Date.today without zone. Use Time.zone.today instead.
:spent_on => Date.today,
^^^^^
test/unit/user_test.rb:390:60: C: Rails/Date: Do not use Date.today without zone. Use Time.zone.today instead.
entry = TimeEntry.new(:hours => '2', :spent_on => Date.today,
^^^^^
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.
:committed_on => Time.now,
^^^
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.
time_not_utc = Time.new(2012, 05, 15, 23, 30)
^^^
test/unit/version_test.rb:161:73: C: Rails/Date: Do not use Date.today without zone. Use Time.zone.today instead.
version = Version.create!(:project_id => 1, :effective_date => Date.today, :name => 'Due today')
^^^^^

973 files inspected, 173 offenses detected, 102 offenses auto-correctable
(2-2/2)