summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorJohn McCrae <john.mccrae@progress.com>2022-03-23 21:11:06 -0700
committerJohn McCrae <john.mccrae@progress.com>2022-03-23 21:11:06 -0700
commit6f29c928d0c6a3a314816dfe8ffa496fa0382596 (patch)
treec36e9e13ec5f9722dfa3e2a67b82ffe9cb7e9c5c /lib
parent9e355a48f7d68c83dbd17b74c5fcc156a9ec6eab (diff)
downloadchef-6f29c928d0c6a3a314816dfe8ffa496fa0382596.tar.gz
updating gemlock files and updating code from feedback
Signed-off-by: John McCrae <john.mccrae@progress.com>
Diffstat (limited to 'lib')
-rw-r--r--lib/chef/api_client_v1.rb1
-rw-r--r--lib/chef/client.rb8
2 files changed, 5 insertions, 4 deletions
diff --git a/lib/chef/api_client_v1.rb b/lib/chef/api_client_v1.rb
index b61efa9857..51c915218e 100644
--- a/lib/chef/api_client_v1.rb
+++ b/lib/chef/api_client_v1.rb
@@ -297,7 +297,6 @@ class Chef
payload[:public_key] = public_key unless public_key.nil?
payload[:create_key] = create_key unless create_key.nil?
- # the new method only gets called when migrating keys to the certificate store.
new_client = if Chef::Config[:migrate_key_to_keystore] == true
chef_rest_v1_with_validator.post("clients", payload)
else
diff --git a/lib/chef/client.rb b/lib/chef/client.rb
index b9944347fc..a91a81d810 100644
--- a/lib/chef/client.rb
+++ b/lib/chef/client.rb
@@ -70,8 +70,6 @@ class Chef
attr_reader :local_context
extend Chef::Mixin::Deprecation
- # extend Chef::Mixin::PowershellExec
- # include Chef::Mixin::PowershellExec
extend Forwardable
#
@@ -727,7 +725,11 @@ class Chef
node = Chef::Config[:node_name]
d = Time.now
- end_date = Time.new(d.year, d.month + 3, d.day, d.hour, d.min, d.sec).utc.iso8601
+ if d.month == 10 || d.month == 11 || d.month == 12
+ end_date = Time.new(d.year + 1, d.month - 9, d.day, d.hour, d.min, d.sec).utc.iso8601
+ else
+ end_date = Time.new(d.year, d.month + 3, d.day, d.hour, d.min, d.sec).utc.iso8601
+ end
payload = {
name: node,