Skip to content
You're viewing an older version of this GitHub Action. Do you want to see the latest version instead?
arrow-right-circle

GitHub Action

Get Timestamp Action

v1.1

Get Timestamp Action

arrow-right-circle

Get Timestamp Action

Get the time in the specified time zone

Installation

Copy and paste the following snippet into your .yml file.

              

- name: Get Timestamp Action

uses: nanzm/[email protected]

Learn more about this action in nanzm/get-time-action

Choose a version

Get Time Action

Get the time in the specified time zone

Example usage

      - name: Get Time
        id: time
        uses: nanzm/[email protected]
        with:
          timeZone: 8
          format: 'YYYY-MM-DD-HH-mm-ss'
      - name: Usage
        env:
          TIME: "${{ steps.time.outputs.time }}"
        run: |
          echo $TIME

Inputs

Parameter Required Info
timeZone false time Zone Default: 0
format false timestamp format string Default: ''

Outputs

Parameter Info
time time in the specified time zone

License

MIT