It's almost 2020 and ESRI still hasn't fixed this? The date filter should be dependent on the set time zone.
I figured changing the time zone in the REST service parameters would fix the date filter problem but all it does is change the visual of the timestamp in the pop ups and attribute table but the date filter is still filtering by UTC.
And to reply to the "Correct Answer" if someone outside my time zone were to look at our applications I would expect them to understand that because we're on the East Coast that 3pm is 3pm EST not 3pm Tokyo, Japan. But all in all our applications are mostly propriety and internal staff view them. They could care less about UTC time.
Has anyone found a real solution to the date filters? I'm hesitant to offset my time to UTC because even if I can use smoke and mirrors to show EST time on the front end if someone were to access the data from the back end it could be confusing to them.
EDIT:
A Solution
My work around trying to avoid creating a custom widget (won't handle TIME but will handle DATE for the filter) was...
*Our DATE column has both date and time. This is all done on Oracle. Can work with SQL server, etc; your syntax may differ.
1) Create a duplicate column of the date column, name it date_UTC or the like
- If your original DATE column has time, truncate the date column to only be date. No time.
- ex) trunc(original_date)
2) Depending on UTC's offset from your local time zone add a time that will handle the offset (I did 8am, don't forget to account for day light savings).
- ex) (trunc(original_date) + 8/24) AS date_UTC
3) On your REST service make sure you set the time zone to your local time zone so your original date column shows the correct time.
- You can set your time zone when publishing the service in Paramters > Advanced but this doesn't work for me. I have to change it in Portal Manager.
4) in Web Map, configure the pop up of your layer. Hide date_UTC and DO NOT SHOW time in the parameters. If you don't it will show in the filter. The timestamp in your filter will confuse users.
5) in WAB when you configure your date filter, use date_UTC.
WAB filter will now correctly handle dates (because it's in UTC). Users will be non the wiser as they'll only see the original date column in pop ups or in the attribute table.
Two cons:
1) What if a user wants to filter by a time range within a day? they can't in this scenario.
2) Someone looks at the data from the back end (through Oracle or ArcCatalog). They'll see a date column in UTC time zone but it's not real timestamps, they're all 8am in my case.