Best practices to publish data in preferred time zone when appending records to feature class

936
3
03-30-2022 03:59 PM
BrittanyBurson
Occasional Contributor III

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:

BrittanyBurson_3-1648680819858.png

Data published to Portal, in UTC:

BrittanyBurson_1-1648680621323.png

 

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:

 BrittanyBurson_0-1648684244937.png

The initial publish is correct:

BrittanyBurson_1-1648684268706.png

After running my Data Interop workbench to update the layer, the data appends in UTC:

BrittanyBurson_2-1648684301602.png

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.

 

0 Kudos
3 Replies
BruceHarold
Esri Regular Contributor

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.

SaraHopkins
New Contributor II

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.

0 Kudos
BruceHarold
Esri Regular Contributor

Hi, I found this:

https://community.safe.com/s/question/0D54Q000080hUwPSAU/portal-for-arcgis-reader-date-issue-fme-rea...

If you are going to the user conference come by and we can troubleshoot.

0 Kudos