How to switch the timezone of DateTime from UTC to other when using the date range filter
How to switch the timezone of DateTime from UTC to other when using the date range filter
Hi All,
I am new to frontend and Datatable. When I tried to use date range filter, the timezone of datetime shown in the calender is UTC, and I wanted that datetime to show in EST. Below are the figures, I have the datetime range work on the third column.
As you can see, when datetime range started by 05:05, there are two entries displayed, which arrival time is 00:05 by EST and 05:05 by UTC. And when datetime range started by 05:06, two entries are no longer displayed. Can anyone tell me how to have date filter show the time in EST, instead of UTC?
Answers
We're happy to take a look, but as per the forum rules, please link to a test case - a test case that replicates the issue will ensure you'll get a quick and accurate response. Information on how to create a test case (if you aren't able to link to the page you are working on) is available here.
Cheers,
Colin
Hi, colin
Thanks for your reply!
I have created a test case. And there is only one data since the probllem was basically about the date. live.datatables.net/nisukiyo/1/
Please click on the calender. When the min date is 2022/01/24 00:02 or 2022/01/24 05:02, the data is still there. However, when the min date is 2022/01/24 05:03, the data is gone. But actually, the data should have gone when min date is 2022/01/24 05:02.
I think the problem here is because of the timezone, and I just could not figure out how to correct that. Can you help me with that?
Thanks for your time and support!
Best,
Hongming
Hi Hongming,
I think it is two different things giving you the problem here:
<=
to<
in theif
condition will do that for you.Allan