Date parameter in Custom plugin

piyushk
piyushk Dataiku DSS Core Designer, Dataiku DSS & SQL, Dataiku DSS Adv Designer, Registered Posts: 55 ✭✭✭✭✭

Hi,

I noticed that when using the date parameter in the custom plugin, the actual value does not get reflected in the backend.

Values provided from frontend: (Default Format: mm/dd/YYYY)

"startDate": "5/8/2020"
"endDate": "6/8/2020"

Values received on backend:

Dataset Config: {'startDate': '2020-05-07T18:30:00.000Z', 'endDate': '2020-06-07T18:30:00.000Z', 'login_preset': {'domain': 'X', 'username': 'X', 'password': 'X'}}

Apparently, it shifts the date to one day behind. Why is it so?

Best Answer

  • 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
    Answer ✓

    @piyushk

    My guess is that this is some how based on local time zones.

    Are you or your server in

    Indian/Cocos


    If so here is another thread where we are discussing a similar situation.

    https://community.dataiku.com/t5/General-Discussion/Understand-datePart-formula/m-p/9468

    You might look at passing a time zone from the front end to the backend.

Answers

  • NN
    NN Neuron, Registered, Neuron 2022, Neuron 2023 Posts: 145 Neuron

    Hi @piyushk
    ,

    Just wondering, were you able to get this to work ?
    I have a similar issue where the date parameter automatically adjusts with the webusers timezone.

Setup Info
    Tags
      Help me…