Select to view content in your preferred language

Problem with Dates in Popup

941
4
11-29-2011 02:31 PM
AHay
by
Deactivated User
The Date/time shown in my popus is not the same as the database it is coming from. 
the popup shows 11/30/2011 11:07 while the database has 30/11/2011 00:37:02
Very Strange i think it is being converted to Universal time/ Greenich mean time  (UT\GMT)

this is very problematic as it means that our website shows lightning that will happen in the future!!!
any ideas??
here is a section of the the popup xml i have attached pics of popup and database showing time and the id field
<description>
          <![CDATA[Time: <b> {TIME_} </b><BR>ID: {id}<BR>Lat: <b>{latitude}</b><BR>Longitude: <b>{longitude}</b><BR>with an intensity of <b> {amplitude} </b>]]>
</description>
<fields>
         <field name="TIME_">
            <format dateformat="shortDateShortTime24"/>
        </field>
</fields>
0 Kudos
4 Replies
by Anonymous User
Not applicable
Original User: Jitesh

There is a limitation with the time field in REST services. There is a software defect logged related to this issue :

NIM068785- There is a date conversion problem while saving edits for a feature layer. The time gets automatically converted to UTC format while trying to save the local time in a date datatype object.

The REST API specification requires that the datetime be stored in UTC. The workaround is to store date in UTC or add a logic in your application to convert UTC date to LocalTime.
0 Kudos
RobertScheitlin__GISP
MVP Emeritus
A Hay,

   Try:

<format dateformat="shortDateShortTime24" useutc="true"/>
0 Kudos
by Anonymous User
Not applicable
Original User: Hay

Thanks
just ended up using a utc field for the popup data and an est (eastern standard time) for the labels, the pop gets converted to est on way through to web app
very odd but it works now
0 Kudos
RichardDiaz
Regular Contributor
Thanks
just ended up using a utc field for the popup data and an est (eastern standard time) for the labels, the pop gets converted to est on way through to web app
very odd but it works now


Are you by any chance consuming data from Vaisala?

Regards,

Rick
0 Kudos