How To Display Time Correctly
Hello,
I am really struggling to get all the times from various DateTime fields to display correctly in the HTML5 viewer.
I have a feature class stored in SQL that has 4 different DateTime fields. I actually have several layers that pull from this same table with different definition queries. I published all of those as a map service and published a different feature service with a single layer of the same feature class with no definition query. That way I can use the one feature service to create new points and make changes to the data no matter which layer the user is making changes from.
After reading other posts, I've gotten really close to storing and displaying the times correctly. Even though I don't need a time slider in the map, I enabled time and set the time zone to Pacific for all the layers and republished it. I set the first and last DateTime fields as the start and end times for each layer.
So with these settings, all the times added to the table through Workflow are stored in Pacific Time. When the Data Time Zone and Display Time Zone are set to either Default or Pacific for the site, the times are displayed correctly (the same as they are in the database) for the first and the last DateTime fields (the ones used as the start and end times for each layer). However, the other two fields are shown as an hour later than they are in the database.
For example, if the times of the four fields in the database are 9:19 AM, 9:20 AM, 10:36 AM, and 11:11 AM, they are displayed in the viewer as 9:19 AM, 10:20 AM, 11:36 AM, and 11:11 AM.
The only solution that comes to mind for me is to make a new table in SQL for the two middle dates, but then I would have to reconstruct everything and create a datalink, and it wouldn't even be viewable in the results table. It would also mess up another application our programmer created that references the data. I am getting really frustrated at how difficult it is to display time as it is shown in the database.
Has anybody else been successful in getting several different DateTime fields from the same layer to display correctly?
Thanks,
Denise
0
-
I also activated the time slider just because I can and set the default extent to 12 AM on Jul 1 - 12 AM on August 1. However, when I load the map, the default time extent shows up as 5 PM on Jun 30 - 5 PM on July 31st even though I have the time zones set to Pacific instead of Default for the site. I had to set the times on the default extent to 7 AM so that it shows up as 12 AM on the days I want. 0
Please sign in to leave a comment.
Comments
1 comment