Select to view content in your preferred language

Trying to set preferredTimeReference in sddraft file when creating a feature service

66
1
yesterday
JoeHershman
MVP Alum

Hi,

I have a script that automates generating feature services.  It all works great except I cannot figure out how to set one property.  The feature service has a setting for the preferred time zone for display

JoeHershman_0-1761091432767.png

Which also shows up in the layer definition if it is set

 "preferredTimeReference": {
  "timeZone": "Eastern Standard Time",
  "respectsDaylightSaving": true
 },

I cannot figure out what the name of this setting should be in the sddraft properties.  I have tried many variations and it always comes in null.  I assume it is setting of another property set along with everything else, but not matter what I try, for example:

<PropertySetProperty xsi:type="typens:PropertySetProperty">
	<Key>preferredTimezoneID</Key>
	<Value xsi:type="xs:string">UTC</Value>
</PropertySetProperty>
<PropertySetProperty xsi:type="typens:PropertySetProperty">
	<Key>preferredTimezoneIDDaylightSavingTime</Key>
	<Value xsi:type="xs:string">true</Value>
</PropertySetProperty>

 

It comes in null in my feature layer definition.  

Does anyone know what the correct setting names are?

We are stuck at Pro 3.3 for now, so I cannot use the new features added in 3.4 that would allow me to set via properties.

As a suggestion, it will be really nice if pro allowed you to save out an sddraft, like you could in ArcMap

 

Thanks,
-Joe
0 Kudos
1 Reply
Clubdebambos
MVP Regular Contributor

Hi @JoeHershman,

Here is what I extracted from the .sddraft file

<PropertySetProperty xsi:type='typens:PropertySetProperty'>
	<Key>preferredTimeZoneRespectsDayLightSavingTime</Key>
	<Value xsi:type='xs:string'>true</Value>
</PropertySetProperty>
<PropertySetProperty xsi:type='typens:PropertySetProperty'>
	<Key>preferredTimeZoneID</Key>
	<Value xsi:type='xs:string'>GMT Standard Time</Value>
</PropertySetProperty>

 

Hope that helps.

All the best,

Glen

~ learn.finaldraftmapping.com
0 Kudos