forked from puppetlabs/puppetlabs-stdlib
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtime.pp
More file actions
11 lines (11 loc) · 742 Bytes
/
time.pp
File metadata and controls
11 lines (11 loc) · 742 Bytes
1
2
3
4
5
6
7
8
9
10
11
# @summary This function is deprecated. It implements the functionality of the original non-namespaced stdlib `time` function.
#
# It is provided for compatability, but users should use the native time related functions directly.
#
# @param _timezone
# This parameter doesn't do anything, but exists for compatability reasons
function stdlib::time(Optional[String] $_timezone = undef) >> Integer {
# Note the `timezone` parameter doesn't do anything and didn't in the ruby implementation for _years_ (pre 1.8.7 perhaps ???)
deprecation('time', 'The stdlib `time` function is deprecated. Please direcly use native Puppet functionality instead. eg. `Integer(Timestamp().strftime(\'%s\'))`', false)
Integer(Timestamp().strftime('%s'))
}