Skip to content

Conversation

carbonin
Copy link
Member

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think an accessor looking method would be better: def self.system_time=(time)

LinuxAdmin::TimeDate.system_time = Time.now

Now the format returned by system_timezone is the same as is
taken by system_timezone=
The full string is still returned by the new system_timezone_detailed
method.
@miq-bot
Copy link
Member

miq-bot commented Sep 28, 2015

Checked commits carbonin/linux_admin@dbd6380~...1672019 with ruby 1.9.3, rubocop 0.34.2, and haml-lint 0.13.0
3 files checked, 2 offenses detected

spec/time_date_spec.rb

  • 🔶 - Line 35, Col 19 - Rails/TimeZone - Do not use Time.new without zone. Use one of Time.zone.local, Time.new.current, Time.new.in_time_zone, Time.new.utc, Time.new.getlocal, Time.new.iso8601, Time.new.jisx0301, Time.new.rfc3339, Time.new.to_i, Time.new.to_f instead.
  • 🔶 - Line 45, Col 19 - Rails/TimeZone - Do not use Time.new without zone. Use one of Time.zone.local, Time.new.current, Time.new.in_time_zone, Time.new.utc, Time.new.getlocal, Time.new.iso8601, Time.new.jisx0301, Time.new.rfc3339, Time.new.to_i, Time.new.to_f instead.

@kbrock
Copy link
Member

kbrock commented Sep 28, 2015

👍 LGTM

for a separate PR, but is there an abstraction for sysctl hidden in here somewhere?

gtanzillo added a commit that referenced this pull request Sep 28, 2015
Added class to wrap timedatectl command
@gtanzillo gtanzillo merged commit 6c66e04 into ManageIQ:master Sep 28, 2015
@carbonin carbonin deleted the add_timedatectl_class branch October 2, 2015 15:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants