Skip to main content
16-Pearl
Apr 19, 2023 6:43 PM UTC
Question

how to hardcode time in datepicker widget where date can be selected by user

While fetching selected date from datepicker widget, i want to hardcode time as 23:59:59.000.

For example if 23/03/2022 is selected in datepicker widget means, while storing data i want tostore as 23/03/2022 23:59:59.000 in datatable. It should work correctly in all timezones. how to do this?

6 replies

16-Pearl
Apr 20, 2023 3:27 AM UTC

Hi @AP_10343008 ,

 

Can you please try with the JS function of " setHours (23, 59, 59, 000) " when you are storing the data in your service.

It may help you.

Arun_C_2-1681961545400.png

 

 

Thanks & Regards,

Arun C

Translate
16-Pearl
Apr 20, 2023 9:54 AM UTC

For me, output time is changing based on timezone offset. I dont want this to be happened.

AP_10343008_0-1681984565037.png

 

Translate
17-Peridot
Apr 20, 2023 1:16 PM UTC

Hello @AP_10343008,

 

I believe Thingworx will always convert from UTC to your local time in the output of the composer.

There is however some ways to get around it looking at this support article.

 

So perhaps you can try to use some of the steps there to get your service to work properly.

 

Regards,

Jens

Translate