Select to view content in your preferred language

Search Widget displays time in UTC

563
3
Jump to solution
09-13-2012 12:28 PM
RyanKammerer1
Deactivated User
I was hoping someone out there may have some insight on an issue I'm experiencing. I'm using the standard search widget with flex 2.4 viewer to display Vehicle history. One of the fields I would like the search widget to display is date/time. It displays this just fine, but for some reason, it is converting the time six hours behind. I'm assuming it is for some reason converting this to UTC time (which is six hours behind). I can't figure out how to correct this issue.

Any ideas on where to check or suggestions?

Thanks!

Ryan Kammerer
Sandy, Utah
Tags (2)
0 Kudos
1 Solution

Accepted Solutions
RobertScheitlin__GISP
MVP Emeritus
Ryan,

   Even back in version 2.4 of the flex viewer you can use a attribute called useutc="true" on a field and you can specify the dateformat as well dateformat="MM/DD/YYYY". So it would look like:

<field name="MY_DATE" useutc="true" dateformat="MM/DD/YYYY"/>


Don't forget to click the Mark as answer check on this post and to click the top arrow (promote).
Follow the steps as shown in the below graphic:

View solution in original post

0 Kudos
3 Replies
RobertScheitlin__GISP
MVP Emeritus
Ryan,

   Even back in version 2.4 of the flex viewer you can use a attribute called useutc="true" on a field and you can specify the dateformat as well dateformat="MM/DD/YYYY". So it would look like:

<field name="MY_DATE" useutc="true" dateformat="MM/DD/YYYY"/>


Don't forget to click the Mark as answer check on this post and to click the top arrow (promote).
Follow the steps as shown in the below graphic:

0 Kudos
RyanKammerer1
Deactivated User
Hi Robert,

Thank you for your reply. Unfortunately, useutc="true" or "false" didn't seem to make a difference. I may be mistaken, because UTC should be six hours AHEAD of my current time. For some reason, the search widget is displaying my current time as six hours BEHIND. In other words, where the current time is 3:15 pm the time displayed from the search widget is 9:15 AM. Any ideas?

Thanks

Ryan
0 Kudos
RyanKammerer1
Deactivated User
Sorry, That did actually correct the six hour time difference. Not sure why it was displaying the time six hours behind, but using your suggested code useutc="true" adds six hours to the time, giving me the correct time.

Thanks!

Ryan
0 Kudos