Skip to main content

How to get the Current Timestamp in IST from UTC using Logger?

Comments

1 comment

  • Rajnish Kucheria

    To get the current timestamp in IST, follow these steps:

    • Configure either HTTP or Scheduler by Quickwork as a trigger to execute the journey.
    • Choose Logger in the Steps section and select Log a Message as an action.
    • Switch to Formula mode for the Message input field and paste the following formula:

              var dateUTC = new Date();

              var dateIST = new Date(dateUTC);

              // Date shifting for IST timezone (+5 hours and 30 minutes)

              dateIST.setHours(dateIST.getHours() + 5); 

              dateIST.setMinutes(dateIST.getMinutes() + 30);

              dateIST;

    • Save the journey and start the execution.
    • Once the journey executes successfully, click the succeeded transaction in the History tab and check the Logger output to see the current timestamp in IST.
    0

Please sign in to leave a comment.