Custom Module Search Date/Time adjust for Time Zone

I am using a Custom Module search using Min and Max on a custom datetime-local item and it returns incorrect results because search is UTC not local time CST.

How do I adjust the search -6:00 for Central Standard Time?

This is the Search Form parameters I am using with my custom property.
`<input type=“datetime-local” name=“prop_GameDate_Min” value="{{request.request_url.params.prop_GameDate_Min | date: “%Y-%m-%dT%H:%M”}}" >

<input type=“datetime-local” name=“prop_GameDate_Max” value="{{request.request_url.params.prop_GameDate_Max | date: “%Y-%m-%dT%H:%M”}}" >`

Can you not just save your module items with CST times?

Failing that, I guess you’d need dummy date entry fields that, on blur or just before submit, you’d convert the dates to javascript time objects, do the plus 6hrs math and populate the real hidden fields with the UTC times, then submit.

Then do the reverse on the results page if you need to show the search queries used.

Here’s a link which may help you get started:


Can you not just save your module items with CST times?

The time we enter would be CST. If I enter a date and time for the module Release date and/or Expiry date it is considered the local time, correct? It displays correctly based on the time entered and there is no 6 hour difference.

The custom module Date Min Max Search field doesn’t work on Release Date, or Expiry Date. The Search Module is alway using UTC so it is 6 hours off in my case. It sound to me like this is a bug. If not that means I have to make adjustments to any modules I need to filter by Date and/or time.

Thanks for reporting this issue, we will fix it in version 5.9.2

@Nastya_Serdiuchenko, That’s great I will be looking for it. Thanks!