@@ -42,7 +42,6 @@ from an array or key from a hash.
4242* [ ` delete_undef_values ` ] ( #delete_undef_values ) : Returns a copy of input hash or array with all undefs deleted.
4343* [ ` delete_values ` ] ( #delete_values ) : Deletes all instances of a given value from a hash.
4444* [ ` deprecation ` ] ( #deprecation ) : Function to print deprecation warnings, Logs a warning once for a given key.
45- * [ ` deprecation ` ] ( #deprecation ) : Function to print deprecation warnings (this is the 3.X version of it).
4645* [ ` difference ` ] ( #difference ) : This function returns the difference between two arrays.
4746* [ ` dirname ` ] ( #dirname ) : Returns the dirname of a path.
4847* [ ` dos2unix ` ] ( #dos2unix ) : Returns the Unix version of the given string.
@@ -142,6 +141,7 @@ Puppet structure
142141* [ ` stdlib::shell_escape ` ] ( #stdlib--shell_escape ) : Escapes a string so that it can be safely used in a Bourne shell command line.
143142* [ ` stdlib::start_with ` ] ( #stdlib--start_with ) : Returns true if str starts with one of the prefixes given. Each of the prefixes should be a String.
144143* [ ` stdlib::str2resource ` ] ( #stdlib--str2resource ) : This converts a string to a puppet resource.
144+ * [ ` stdlib::time ` ] ( #stdlib--time ) : This function is deprecated. It implements the functionality of the original non-namespaced stdlib ` time ` function.
145145* [ ` stdlib::to_json ` ] ( #stdlib--to_json ) : Convert a data structure and output to JSON
146146* [ ` stdlib::to_json_pretty ` ] ( #stdlib--to_json_pretty ) : Convert data structure and output to pretty JSON
147147* [ ` stdlib::to_python ` ] ( #stdlib--to_python ) : Convert an object into a String containing its Python representation
@@ -161,7 +161,7 @@ OS X versions >= 10.7).
161161* [ ` suffix ` ] ( #suffix ) : This function applies a suffix to all elements in an array, or to the keys
162162in a hash.
163163* [ ` swapcase ` ] ( #swapcase ) : This function will swap the existing case of a string.
164- * [ ` time ` ] ( #time ) : This function will return the current time since epoch as an integer.
164+ * [ ` time ` ] ( #time ) : DEPRECATED. Use the native Puppet fuctionality instead of this function. eg ` Integer(Timestamp().strftime('%s')) `
165165* [ ` to_bytes ` ] ( #to_bytes ) : Converts the argument into bytes, for example 4 kB becomes 4096.
166166* [ ` to_json ` ] ( #to_json ) : DEPRECATED. Use the namespaced function [ ` stdlib::to_json ` ] ( #stdlibto_json ) instead.
167167* [ ` to_json_pretty ` ] ( #to_json_pretty ) : DEPRECATED. Use the namespaced function [ ` stdlib::to_json_pretty ` ] ( #stdlibto_json_pretty ) instead.
@@ -1480,20 +1480,6 @@ When `true`, (the default), the function is affected by the puppet setting 'stri
14801480(outputs as an error message), : off (no message / error is displayed) and : warning
14811481(default, outputs a warning).
14821482
1483- ### <a name =" deprecation " ></a >` deprecation `
1484-
1485- Type: Ruby 3.x API
1486-
1487- The uniqueness key - can appear once. The msg is the message text including any positional
1488- information that is formatted by the user/caller of the method.).
1489-
1490- #### ` deprecation() `
1491-
1492- The uniqueness key - can appear once. The msg is the message text including any positional
1493- information that is formatted by the user/caller of the method.).
1494-
1495- Returns: ` String ` return deprecation warnings
1496-
14971483### <a name =" difference " ></a >` difference `
14981484
14991485Type: Ruby 3.x API
@@ -4111,6 +4097,24 @@ Data type: `String`
41114097
41124098The string to lookup as a resource
41134099
4100+ ### <a name =" stdlib--time " ></a >` stdlib::time `
4101+
4102+ Type: Puppet Language
4103+
4104+ It is provided for compatability, but users should use the native time related functions directly.
4105+
4106+ #### ` stdlib::time(Optional[String] $_timezone = undef) `
4107+
4108+ It is provided for compatability, but users should use the native time related functions directly.
4109+
4110+ Returns: ` Integer `
4111+
4112+ ##### ` _timezone `
4113+
4114+ Data type: ` Optional[String] `
4115+
4116+ This parameter doesn't do anything, but exists for compatability reasons
4117+
41144118### <a name =" stdlib--to_json " ></a >` stdlib::to_json `
41154119
41164120Type: Ruby 4.x API
@@ -4876,43 +4880,21 @@ Would result in: "AbCd"
48764880
48774881### <a name =" time " ></a >` time `
48784882
4879- Type: Ruby 3.x API
4880-
4881- > * Note:* that since Puppet 4.8.0 the Puppet language has the data types Timestamp (a point in time) and
4882- Timespan (a duration). The following example is equivalent to calling time() without
4883- any arguments:
4884-
4885- ``` Timestamp() ```
4886-
4887- #### Examples
4888-
4889- ##### ** Usage**
4890-
4891- ``` puppet
4892-
4893- time()
4894- Will return something like: 1311972653
4895- ```
4883+ Type: Ruby 4.x API
48964884
4897- #### ` time( )`
4885+ DEPRECATED. Use the native Puppet fuctionality instead of this function. eg ` Integer(Timestamp().strftime('%s') )`
48984886
4899- > * Note:* that since Puppet 4.8.0 the Puppet language has the data types Timestamp (a point in time) and
4900- Timespan (a duration). The following example is equivalent to calling time() without
4901- any arguments:
4887+ #### ` time(Any *$args) `
49024888
4903- ``` Timestamp() ```
4889+ The time function.
49044890
4905- Returns: ` Any ` the current time since epoch as an integer.
4891+ Returns: ` Any `
49064892
4907- ##### Examples
4893+ ##### ` *args `
49084894
4909- ###### ** Usage **
4895+ Data type: ` Any `
49104896
4911- ``` puppet
49124897
4913- time()
4914- Will return something like: 1311972653
4915- ```
49164898
49174899### <a name =" to_bytes " ></a >` to_bytes `
49184900
0 commit comments