@@ -42,7 +42,6 @@ from an array or key from a hash.
42
42
* [ ` delete_undef_values ` ] ( #delete_undef_values ) : Returns a copy of input hash or array with all undefs deleted.
43
43
* [ ` delete_values ` ] ( #delete_values ) : Deletes all instances of a given value from a hash.
44
44
* [ ` 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).
46
45
* [ ` difference ` ] ( #difference ) : This function returns the difference between two arrays.
47
46
* [ ` dirname ` ] ( #dirname ) : Returns the dirname of a path.
48
47
* [ ` dos2unix ` ] ( #dos2unix ) : Returns the Unix version of the given string.
@@ -142,6 +141,7 @@ Puppet structure
142
141
* [ ` stdlib::shell_escape ` ] ( #stdlib--shell_escape ) : Escapes a string so that it can be safely used in a Bourne shell command line.
143
142
* [ ` 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.
144
143
* [ ` 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.
145
145
* [ ` stdlib::to_json ` ] ( #stdlib--to_json ) : Convert a data structure and output to JSON
146
146
* [ ` stdlib::to_json_pretty ` ] ( #stdlib--to_json_pretty ) : Convert data structure and output to pretty JSON
147
147
* [ ` 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).
161
161
* [ ` suffix ` ] ( #suffix ) : This function applies a suffix to all elements in an array, or to the keys
162
162
in a hash.
163
163
* [ ` 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')) `
165
165
* [ ` to_bytes ` ] ( #to_bytes ) : Converts the argument into bytes, for example 4 kB becomes 4096.
166
166
* [ ` to_json ` ] ( #to_json ) : DEPRECATED. Use the namespaced function [ ` stdlib::to_json ` ] ( #stdlibto_json ) instead.
167
167
* [ ` 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
1480
1480
(outputs as an error message), : off (no message / error is displayed) and : warning
1481
1481
(default, outputs a warning).
1482
1482
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
-
1497
1483
### <a name =" difference " ></a >` difference `
1498
1484
1499
1485
Type: Ruby 3.x API
@@ -4111,6 +4097,24 @@ Data type: `String`
4111
4097
4112
4098
The string to lookup as a resource
4113
4099
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
+
4114
4118
### <a name =" stdlib--to_json " ></a >` stdlib::to_json `
4115
4119
4116
4120
Type: Ruby 4.x API
@@ -4876,43 +4880,21 @@ Would result in: "AbCd"
4876
4880
4877
4881
### <a name =" time " ></a >` time `
4878
4882
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
4896
4884
4897
- #### ` time( )`
4885
+ DEPRECATED. Use the native Puppet fuctionality instead of this function. eg ` Integer(Timestamp().strftime('%s') )`
4898
4886
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) `
4902
4888
4903
- ``` Timestamp() ```
4889
+ The time function.
4904
4890
4905
- Returns: ` Any ` the current time since epoch as an integer.
4891
+ Returns: ` Any `
4906
4892
4907
- ##### Examples
4893
+ ##### ` *args `
4908
4894
4909
- ###### ** Usage **
4895
+ Data type: ` Any `
4910
4896
4911
- ``` puppet
4912
4897
4913
- time()
4914
- Will return something like: 1311972653
4915
- ```
4916
4898
4917
4899
### <a name =" to_bytes " ></a >` to_bytes `
4918
4900
0 commit comments