Skip to content

Commit

Permalink
work around deprecation message (voxpupuli#42)
Browse files Browse the repository at this point in the history
  • Loading branch information
prolixalias authored Feb 14, 2022
1 parent 124fbf2 commit 0f5008b
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions functions/is_patchday.pp
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@ function patching_as_code::is_patchday(
String $patch_group
){
$srv_utc_time = Timestamp()
$node_offset = $facts['patching_as_code_utc_offset'].empty ? {
true => 0,
false => $facts['patching_as_code_utc_offset']
$node_offset = $facts['patching_as_code_utc_offset'] ? {
undef => 0,
default => $facts['patching_as_code_utc_offset'],
}
$node_timestamp = $srv_utc_time + ($node_offset * 3600)
$year = $node_timestamp.strftime('%Y')
Expand Down

0 comments on commit 0f5008b

Please sign in to comment.