diff --git a/content/io/cloudslang/base/os/os_detector.sl b/content/io/cloudslang/base/os/os_detector.sl index 2ddd751f5e..8e9352e76a 100644 --- a/content/io/cloudslang/base/os/os_detector.sl +++ b/content/io/cloudslang/base/os/os_detector.sl @@ -377,7 +377,7 @@ operation: private: true java_action: - gav: 'io.cloudslang.content:cs-utilities:0.1.22' + gav: 'io.cloudslang.content:cs-utilities:0.1.24-RC2' class_name: 'io.cloudslang.content.utilities.actions.OsDetector' method_name: 'execute' diff --git a/content/io/cloudslang/base/utils/base64_decoder_to_file.sl b/content/io/cloudslang/base/utils/base64_decoder_to_file.sl index fa2e72e7dd..f5c1440a38 100644 --- a/content/io/cloudslang/base/utils/base64_decoder_to_file.sl +++ b/content/io/cloudslang/base/utils/base64_decoder_to_file.sl @@ -46,7 +46,7 @@ operation: private: true java_action: - gav: 'io.cloudslang.content:cs-utilities:0.1.22' + gav: 'io.cloudslang.content:cs-utilities:0.1.24-RC2' class_name: io.cloudslang.content.utilities.actions.Base64DecoderToFile method_name: execute diff --git a/content/io/cloudslang/base/utils/convert_epoch_time.sl b/content/io/cloudslang/base/utils/convert_epoch_time.sl index 1a5bd1d89e..f7b05b6f91 100644 --- a/content/io/cloudslang/base/utils/convert_epoch_time.sl +++ b/content/io/cloudslang/base/utils/convert_epoch_time.sl @@ -47,7 +47,7 @@ operation: private: true java_action: - gav: 'io.cloudslang.content:cs-utilities:0.1.22' + gav: 'io.cloudslang.content:cs-utilities:0.1.24-RC2' class_name: 'io.cloudslang.content.utilities.actions.ConvertEpochTime' method_name: 'execute' diff --git a/content/io/cloudslang/base/utils/counter.sl b/content/io/cloudslang/base/utils/counter.sl index 039f632ad2..fdd81f0b7a 100644 --- a/content/io/cloudslang/base/utils/counter.sl +++ b/content/io/cloudslang/base/utils/counter.sl @@ -52,7 +52,7 @@ operation: required: false java_action: - gav: 'io.cloudslang.content:cs-utilities:0.1.22' + gav: 'io.cloudslang.content:cs-utilities:0.1.24-RC2' class_name: 'io.cloudslang.content.utilities.actions.Counter' method_name: 'execute' diff --git a/content/io/cloudslang/base/utils/default_if_empty.sl b/content/io/cloudslang/base/utils/default_if_empty.sl index 07511021c1..9f1d90fff2 100644 --- a/content/io/cloudslang/base/utils/default_if_empty.sl +++ b/content/io/cloudslang/base/utils/default_if_empty.sl @@ -55,7 +55,7 @@ operation: required: false java_action: - gav: 'io.cloudslang.content:cs-utilities:0.1.22' + gav: 'io.cloudslang.content:cs-utilities:0.1.24-RC2' class_name: 'io.cloudslang.content.utilities.actions.DefaultIfEmpty' method_name: 'execute' diff --git a/content/io/cloudslang/base/utils/epoch_time_difference.sl b/content/io/cloudslang/base/utils/epoch_time_difference.sl new file mode 100644 index 0000000000..d7c5752421 --- /dev/null +++ b/content/io/cloudslang/base/utils/epoch_time_difference.sl @@ -0,0 +1,63 @@ +# Copyright 2023 Open Text +# This program and the accompanying materials +# are made available under the terms of the Apache License v2.0 which accompany this distribution. +# +# The Apache License is available at +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +######################################################################################################################## +#!! +#! @description: This operation converts the unix/epoch time into date format and calculate the time difference. +#! +#! @input epoch_time: The epoch time in milliseconds. +#! Example: 1675660713000 +#! @input time_zone: The scheduler timeZone in UTC format. +#! Example: Asia/Kolkata +#! +#! @output date_format: The converted date. +#! @output utc_zone_offset: UTC offset value. +#! @output time_difference: Time difference. +#! @output exception: Exception if there was an error when executing, empty otherwise. +#! +#! @result SUCCESS: Returns the date format. +#! @result FAILURE: An error has occurred while trying to convert unix time to date format. +#!!# +######################################################################################################################## + +namespace: io.cloudslang.base.utils + +operation: + name: epoch_time_difference + + inputs: + - epoch_time + - epochTime: + default: ${get('epoch_time', '')} + required: false + private: true + - time_zone + - timeZone: + default: ${get('time_zone', '')} + required: false + private: true + + java_action: + gav: 'io.cloudslang.content:cs-utilities:0.1.24-RC2' + class_name: 'io.cloudslang.content.utilities.actions.EpochTimeDifference' + method_name: 'execute' + + outputs: + - date_format: ${get('dateFormat', '')} + - utc_zone_offset: ${get('utcZoneOffset', '')} + - time_difference: ${get('timeDifference', '')} + - exception: ${get('exception', '')} + + results: + - SUCCESS: ${returnCode=='0'} + - FAILURE \ No newline at end of file diff --git a/content/io/cloudslang/base/utils/find_text_in_pdf.sl b/content/io/cloudslang/base/utils/find_text_in_pdf.sl index b0ff51618e..088fa6e686 100644 --- a/content/io/cloudslang/base/utils/find_text_in_pdf.sl +++ b/content/io/cloudslang/base/utils/find_text_in_pdf.sl @@ -58,7 +58,7 @@ operation: sensitive: true java_action: - gav: 'io.cloudslang.content:cs-utilities:0.1.22' + gav: 'io.cloudslang.content:cs-utilities:0.1.24-RC2' class_name: 'io.cloudslang.content.utilities.actions.FindTextInPdf' method_name: 'execute' diff --git a/content/io/cloudslang/base/utils/local_ping.sl b/content/io/cloudslang/base/utils/local_ping.sl index b3b47f008c..f27a7f5588 100644 --- a/content/io/cloudslang/base/utils/local_ping.sl +++ b/content/io/cloudslang/base/utils/local_ping.sl @@ -85,7 +85,7 @@ operation: private: true java_action: - gav: 'io.cloudslang.content:cs-utilities:0.1.22' + gav: 'io.cloudslang.content:cs-utilities:0.1.24-RC2' class_name: 'io.cloudslang.content.utilities.actions.LocalPing' method_name: 'execute' diff --git a/content/io/cloudslang/base/utils/random_password_generator.sl b/content/io/cloudslang/base/utils/random_password_generator.sl index 49c5f721a4..30828f7726 100644 --- a/content/io/cloudslang/base/utils/random_password_generator.sl +++ b/content/io/cloudslang/base/utils/random_password_generator.sl @@ -94,7 +94,7 @@ operation: java_action: - gav: 'io.cloudslang.content:cs-utilities:0.1.22' + gav: 'io.cloudslang.content:cs-utilities:0.1.24-RC2' class_name: io.cloudslang.content.utilities.actions.RandomPasswordGenerator method_name: execute diff --git a/content/io/cloudslang/base/utils/schedule_time.sl b/content/io/cloudslang/base/utils/schedule_time.sl index 678e8ed1b5..a5d7f17c29 100644 --- a/content/io/cloudslang/base/utils/schedule_time.sl +++ b/content/io/cloudslang/base/utils/schedule_time.sl @@ -45,7 +45,7 @@ operation: private: true java_action: - gav: 'io.cloudslang.content:cs-utilities:0.1.22' + gav: 'io.cloudslang.content:cs-utilities:0.1.24-RC2' class_name: 'io.cloudslang.content.utilities.actions.SchedulerTime' method_name: 'execute'