<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic How to display dateTime as UTC in the mashup grid in ThingWorx Developers</title>
    <link>https://www.ptcusercommunity.com/t5/ThingWorx-Developers/How-to-display-dateTime-as-UTC-in-the-mashup-grid/m-p/519979#M15371</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;We are working with dateTime without referring to time zones - it's called floating time (I think).&lt;/P&gt;&lt;P&gt;Anyway, we are getting the date and time without time zone, we are saving it as UTC in the DB.&lt;/P&gt;&lt;P&gt;In the mashup I want to display the date as UTC.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Untill now, what I managed to display is:&amp;nbsp; &lt;SPAN style="color: #333333; font-family: 'Segoe UI', 'Helvetica Neue', Helvetica, Arial, sans-serif; font-size: 11px;"&gt;2017-03-22 06:22:52+0800&lt;/SPAN&gt; while the input string was: 2017/03/22 10:22:52 I used the format: "&lt;SPAN style="color: #333333; font-family: 'Segoe UI', 'Helvetica Neue', Helvetica, Arial, sans-serif; font-size: 11px;"&gt;yyyy-MM-dd hh:mm:ssZ&lt;/SPAN&gt;"&lt;/P&gt;&lt;P&gt;The data is correct besides the need of the user to manually calculate it.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If I'm using expression: new Date(d.setTime(d.getTime() + (d.getTimezoneOffset() * 60 * 1000)))&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;It will display it nicely as DateTime, but the data is coming and bound to the GRID in the mashup so I'm not sure how to use expression with it.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Is there anything I'm missing here?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 21 Mar 2017 08:57:25 GMT</pubDate>
    <dc:creator>aelgov</dc:creator>
    <dc:date>2017-03-21T08:57:25Z</dc:date>
    <item>
      <title>How to display dateTime as UTC in the mashup grid</title>
      <link>https://www.ptcusercommunity.com/t5/ThingWorx-Developers/How-to-display-dateTime-as-UTC-in-the-mashup-grid/m-p/519979#M15371</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;We are working with dateTime without referring to time zones - it's called floating time (I think).&lt;/P&gt;&lt;P&gt;Anyway, we are getting the date and time without time zone, we are saving it as UTC in the DB.&lt;/P&gt;&lt;P&gt;In the mashup I want to display the date as UTC.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Untill now, what I managed to display is:&amp;nbsp; &lt;SPAN style="color: #333333; font-family: 'Segoe UI', 'Helvetica Neue', Helvetica, Arial, sans-serif; font-size: 11px;"&gt;2017-03-22 06:22:52+0800&lt;/SPAN&gt; while the input string was: 2017/03/22 10:22:52 I used the format: "&lt;SPAN style="color: #333333; font-family: 'Segoe UI', 'Helvetica Neue', Helvetica, Arial, sans-serif; font-size: 11px;"&gt;yyyy-MM-dd hh:mm:ssZ&lt;/SPAN&gt;"&lt;/P&gt;&lt;P&gt;The data is correct besides the need of the user to manually calculate it.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If I'm using expression: new Date(d.setTime(d.getTime() + (d.getTimezoneOffset() * 60 * 1000)))&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;It will display it nicely as DateTime, but the data is coming and bound to the GRID in the mashup so I'm not sure how to use expression with it.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Is there anything I'm missing here?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 21 Mar 2017 08:57:25 GMT</pubDate>
      <guid>https://www.ptcusercommunity.com/t5/ThingWorx-Developers/How-to-display-dateTime-as-UTC-in-the-mashup-grid/m-p/519979#M15371</guid>
      <dc:creator>aelgov</dc:creator>
      <dc:date>2017-03-21T08:57:25Z</dc:date>
    </item>
  </channel>
</rss>

