Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Epoch time #1750

Open
wants to merge 14 commits into
base: WS_2_0
Choose a base branch
from
2 changes: 1 addition & 1 deletion content/io/cloudslang/base/os/os_detector.sl
Original file line number Diff line number Diff line change
Expand Up @@ -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'

Expand Down
2 changes: 1 addition & 1 deletion content/io/cloudslang/base/utils/base64_decoder_to_file.sl
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
2 changes: 1 addition & 1 deletion content/io/cloudslang/base/utils/convert_epoch_time.sl
Original file line number Diff line number Diff line change
Expand Up @@ -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'

Expand Down
2 changes: 1 addition & 1 deletion content/io/cloudslang/base/utils/counter.sl
Original file line number Diff line number Diff line change
Expand Up @@ -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'

Expand Down
2 changes: 1 addition & 1 deletion content/io/cloudslang/base/utils/default_if_empty.sl
Original file line number Diff line number Diff line change
Expand Up @@ -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'

Expand Down
63 changes: 63 additions & 0 deletions content/io/cloudslang/base/utils/epoch_time_difference.sl
Original file line number Diff line number Diff line change
@@ -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
2 changes: 1 addition & 1 deletion content/io/cloudslang/base/utils/find_text_in_pdf.sl
Original file line number Diff line number Diff line change
Expand Up @@ -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'

Expand Down
2 changes: 1 addition & 1 deletion content/io/cloudslang/base/utils/local_ping.sl
Original file line number Diff line number Diff line change
Expand Up @@ -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'

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
2 changes: 1 addition & 1 deletion content/io/cloudslang/base/utils/schedule_time.sl
Original file line number Diff line number Diff line change
Expand Up @@ -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'

Expand Down