Hi all and @BruceHarold ,
I am looking for some guidance on the best way to control for time zones when appending data to a feature class using Data Interoperability. In our case all times are negligible and so read in at 12:00 am, which roll back to the previous day when converted from Pacific Time to UTC when published to Portal.
I know it's not a Data Interop specific issue... my team has run into it with Model Builder as well. There are a few threads on this issue, such as this one and this one.
Example from data cache before publish to Portal:
Data published to Portal, in UTC:
So I then tried publishing the feature service first using ArcGIS Pro 2.9.2, and designating the Time Zone setting at time of publishing:
The initial publish is correct:
After running my Data Interop workbench to update the layer, the data appends in UTC:
I found this How To: article but it seems only apply to ArcGIS Online? We are currently on Enterprise 10.8.1.
Thank you in advance for discussion on this topic, and apologies if I've missed a very obvious transformer or part of the workflow.
Hi Brittany, your feature service will have datetime fields stored in UTC so when upserting using Data Interoperability use the available datetime transformation functions to offset to UTC before writing.
Brittany and Bruce,
Were you able resolve this issue by setting the values back to utc? I have the same issue with the same time zone and have been unsuccessful in getting this to work. I republished my feature layer to make sure it has the correct time zone, and tried this for my attribute:
@DateTimeFormat(@TimeZoneSet(@Value(Date_Time),utc,auto), %Y %m %d %H:%M %z) This resulted in the offset being -00:00, but the values in AGOL were still off by 8 hours.
I then tried: @DateTimeFormat(@TimeZoneSet(@Value(Date_Time),local,auto), %Y %m %d %H:%M %z) which gave me -08:00 and -07:00 values, but again when they made it into AGOL my values were still off and back to UTC.
Hi, I found this:
If you are going to the user conference come by and we can troubleshoot.