Timezone Not Local

Options

Hi, I have a function with 2 inputs:

{ "date_input": "now",

"timezone_input": "America/New_York" }

I'm trying to get the date for users in New York. However, when I run my function it keeps giving me the date for UTC rather than the local date.


Not sure what i'm missing, I included screenshots below, it's Nov 21st New York time, but it keeps giving me Nov 22nd.


Tagged:

Best Answer

  • Michael Udinski
    Michael Udinski Administrator

    ADMIN

    Answer ✓
    Options

    Hi @Abdullah Abdulkarim -- timestamps and dates are two different data types. You will either want to use a timestamp input to apply this transformation or convert your date input into a UNIX timestamp in milliseconds before applying the transformation

Answers