Date parameter in Custom plugin

Solved!
piyushk
Level 4
Date parameter in Custom plugin

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?

0 Kudos
1 Solution
tgb417

@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.

--Tom

View solution in original post

2 Replies
tgb417

@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.

--Tom
NN

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.

0 Kudos