Converting UTC to EST

leeIdoine
leeIdoine Registered Posts: 8

Wondering if anyone has found a fix to this issue. I am trying to convert a string time stamp from UTC to EST using the parse date recipe. However, The time stamp is being converted incorrectly. It is converting a UTC time stamp of 8AM to 12PM EST. This is the opposite of what it should be doing. I have the locale set to en_US and the timezone set to America/New York. Is there a way to convert a string UTC time stamp to a parsed Date while also converting it to east coast time?

Thanks,

Best Answer

Answers

  • leeIdoine
    leeIdoine Registered Posts: 8

    Great. Looks like this works like a charm. Appreciate the solution.

  • Brenda
    Brenda Registered Posts: 4

    Thanks a lots! it's a great help for me

  • leeIdoine
    leeIdoine Registered Posts: 8

    I have an additional question about this, @AlexT

    So I am now trying to filter on my EST column. I am trying to filter data from 8AM-9PM. However, when I do this, its returning instances that have time stamps that are before 8AM and will only return values up to 4:59PM. However, in the analyze tool, it says the max time stamp in EST is 20:59.50. Which seems like it would be correct because the cut off should be at 9PM. But I can not see the data via export, nor in the table. I am concerned because I am getting different answers when I filter on the EST column I created, and when I do the same filter but use the UTC parsed time. These should be the same, but they are returning different numbers. And I believe its because the EST column is not capturing all the data for some reason.

  • tgb417
    tgb417 Dataiku DSS Core Designer, Dataiku DSS & SQL, Dataiku DSS ML Practitioner, Dataiku DSS Core Concepts, Neuron 2020, Neuron, Registered, Dataiku Frontrunner Awards 2021 Finalist, Neuron 2021, Neuron 2022, Frontrunner 2022 Finalist, Frontrunner 2022 Winner, Dataiku Frontrunner Awards 2021 Participant, Frontrunner 2022 Participant, Neuron 2023 Posts: 1,601 Neuron

    @leeIdoine
    ,

    I do not have a specific answer for you. I do have a possible clue that may help you work out what is going on. Dataiku tends to handle dates and times with a bias to UTC. UTC does not do any crazy daylight saving stuff. UTC is also 4 or 5 hours ahead of us in EST time zone depending on the time of year.

    One of the things I would check when dealing with Dataiku and regional time zones is do Daylight saving shifts or offsets from UTC have anything to do with the challenge I’m dealing with. Given that what you are trying to do is off by 4 hours and we are currently UTC -4 here on the east coast. Something may be going on there.

    Just a thought hope it might help you a bit.

  • leeIdoine
    leeIdoine Registered Posts: 8

    Hey @tgb417
    ,

    Yeah even though I am filtering on my EST column from 8AM until 9PM. Its returning values from 4AM to 5PM. Which to me seems like its still looking at the column in UTC in the background. I am able to extract date components from the EST column, make those values an integer, and then filter using those. (IE where year=2023, month=5, day=25 Hour >=8 and hour <21. But to me it seems like this should be an unnecessary work around.

  • tgb417
    tgb417 Dataiku DSS Core Designer, Dataiku DSS & SQL, Dataiku DSS ML Practitioner, Dataiku DSS Core Concepts, Neuron 2020, Neuron, Registered, Dataiku Frontrunner Awards 2021 Finalist, Neuron 2021, Neuron 2022, Frontrunner 2022 Finalist, Frontrunner 2022 Winner, Dataiku Frontrunner Awards 2021 Participant, Frontrunner 2022 Participant, Neuron 2023 Posts: 1,601 Neuron

    @leeIdoine
    ,

    Agreed regarding unnecessary work around. It feel like this is a potential defect. I’d encourage you to submit a support ticket on this item. See what the support team can do to help out. I’d also suggest that you add a product idea here in the community. I also would like to see better more complete support of world wide time zones.

  • leeIdoine
    leeIdoine Registered Posts: 8

    @tgb417
    @AlexT

    I just realized that formatting the date to a particular time zone outside of UTC is not accurate either. Right now, UTC is 5 hours ahead of EST. However, when formatting a UTC time stamp to EST, it is only subtracting 4 hours. it seems that the best way to do this for me right now is using an inc formula, and subtracting 5 hours to create the create EST conversion time stamp column. However, I do not want to have to go in and update this formula every daylight savings time, and then when time converts back to standard time. Seems to me that this is a defect as @tgb417
    implied. I will update the thread after I discuss with dataiku support.

Setup Info
    Tags
      Help me…