Get current time tied to timezone
@dylburger
code:
data:privatelast updated:2 years ago
today
Build integrations remarkably fast!
You're viewing a public workflow template.
Sign up to customize, add steps, modify code and more.
Join 500,000+ developers using the Pipedream platform
steps.
trigger
HTTP API
Deploy to generate unique URL
This workflow runs on Pipedream's servers and is triggered by HTTP / Webhook requests.
steps.
get_current_time_in_specific_timezone
Returns the current time, tied to this workflow invocation, in the target timezone
params
Timezone

The IANA timezone name, e.g. America/Los_Angeles. See the full list here.

 
string ·params.timezone
code
async params => {
1
2
3
}
4
const moment = require("moment-timezone")
return moment.tz(new Date(), params.timezone).format();