Skip to content

Commit 0c284b9

Browse files
committed
Fix strftime() deprecation warning
When running on Puppet 8, a warning is produced: ``` The argument signature (String format, [String timezone]) is deprecated for #strftime. See #strftime documentation and Timespan type for more info ``` Pass a timestamp as the first parameter to use a non-deprecated signature of the function `(Timespan $time_object, String $format)`.
1 parent 26cb2e4 commit 0c284b9

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

manifests/install/windows.pp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@
5757
$_puppet_run_wait = undef
5858
}
5959

60-
$_timestamp = strftime('%Y_%m_%d-%H_%M')
60+
$_timestamp = Timestamp().strftime('%Y_%m_%d-%H_%M')
6161
$_logfile = windows_native_path("${facts['env_temp_variable']}/puppet-${_timestamp}-installer.log")
6262

6363
notice ("Puppet upgrade log file at ${_logfile}")

0 commit comments

Comments
 (0)