To get the current timestamp in IST, follow these steps:
- Configure either HTTP or Scheduler by Quickwork trigger to execute the journey.
- Choose Logger in the Steps section and then Log a Message as an action.
- Switch to the Formula mode for the Message input field. Paste the following formula in the text area:
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);
- Save the journey and start the execution.
- Click the succeeded transaction in the History section and check the Logger output:
- You'll get the current timestamp as per IST using Logger.