<?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 Re: Major (?) issue with timezone on stored dates in APIs &amp; Integrations</title>
    <link>https://community.hubspot.com/t5/APIs-Integrations/Major-issue-with-timezone-on-stored-dates/m-p/267670#M24077</link>
    <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.hubspot.com/t5/user/viewprofilepage/user-id/13804"&gt;@JasminLin&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'd prefer not to post account data here, sorry.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Are you able to access support tickets? I've detailed everything in ticket&amp;nbsp;2404161, including a deal ID (and field) for the example I gave above.&lt;/P&gt;</description>
    <pubDate>Tue, 30 Apr 2019 17:18:23 GMT</pubDate>
    <dc:creator>alansp</dc:creator>
    <dc:date>2019-04-30T17:18:23Z</dc:date>
    <item>
      <title>Major (?) issue with timezone on stored dates</title>
      <link>https://community.hubspot.com/t5/APIs-Integrations/Major-issue-with-timezone-on-stored-dates/m-p/267435#M24031</link>
      <description>&lt;P&gt;&lt;SPAN&gt;Our timezone is set to PST (-7), but when we select 2019-03-28 in a datepicker, it stores it as 2019-03-28 00:00 UTC.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;The problem here is that when we extract that date via API, and convert to PST, it becomes:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;2019-03-27 17:00 PST&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;The day has completely changed.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Surely if we've selected PST as the timezone for our account, the date should be stored as 2019-03-28 00:00 PST, ie: 2019-03-28 07:00 UTC&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 29 Apr 2019 17:37:13 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/APIs-Integrations/Major-issue-with-timezone-on-stored-dates/m-p/267435#M24031</guid>
      <dc:creator>alansp</dc:creator>
      <dc:date>2019-04-29T17:37:13Z</dc:date>
    </item>
    <item>
      <title>Re: Major (?) issue with timezone on stored dates</title>
      <link>https://community.hubspot.com/t5/APIs-Integrations/Major-issue-with-timezone-on-stored-dates/m-p/267503#M24053</link>
      <description>&lt;P&gt;Hey&amp;nbsp;&lt;a href="https://community.hubspot.com/t5/user/viewprofilepage/user-id/93200"&gt;@alansp&lt;/a&gt;&amp;nbsp;, could you provide me your hub ID and an example of where you are setting the date and pulling it via API? E.g. a contact record's date property?&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 30 Apr 2019 06:47:01 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/APIs-Integrations/Major-issue-with-timezone-on-stored-dates/m-p/267503#M24053</guid>
      <dc:creator>JasminLin</dc:creator>
      <dc:date>2019-04-30T06:47:01Z</dc:date>
    </item>
    <item>
      <title>Re: Major (?) issue with timezone on stored dates</title>
      <link>https://community.hubspot.com/t5/APIs-Integrations/Major-issue-with-timezone-on-stored-dates/m-p/267670#M24077</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.hubspot.com/t5/user/viewprofilepage/user-id/13804"&gt;@JasminLin&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'd prefer not to post account data here, sorry.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Are you able to access support tickets? I've detailed everything in ticket&amp;nbsp;2404161, including a deal ID (and field) for the example I gave above.&lt;/P&gt;</description>
      <pubDate>Tue, 30 Apr 2019 17:18:23 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/APIs-Integrations/Major-issue-with-timezone-on-stored-dates/m-p/267670#M24077</guid>
      <dc:creator>alansp</dc:creator>
      <dc:date>2019-04-30T17:18:23Z</dc:date>
    </item>
    <item>
      <title>Re: Major (?) issue with timezone on stored dates</title>
      <link>https://community.hubspot.com/t5/APIs-Integrations/Major-issue-with-timezone-on-stored-dates/m-p/268302#M24161</link>
      <description>&lt;P&gt;Hey&amp;nbsp;&lt;a href="https://community.hubspot.com/t5/user/viewprofilepage/user-id/93200"&gt;@alansp&lt;/a&gt;&amp;nbsp;, sorry I should have included the option that you could also direct message me your hub details. But no worries, I do have access to the support ticket you have open with one of our support rep and I worked with her on your query.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The reporting_date deal property you are using is a date type property - you can see the type by using &lt;A href="https://developers.hubspot.com/docs/methods/deals/get_deal_property" target="_self"&gt;this endpoint&lt;/A&gt;. Any date picker property created in HubSpot is created as a date property. The way date properties work currently is that it only stores the date and not the time. So by default it is set to midnight UTC. You can only store timestamps that are exactly midnight UTC e.g.&amp;nbsp;1556841600000 is 3 May 2019 00:00:00 UTC. It is not possible to store a timestamp that is not exactly midnight UTC e.g. if you try via API to store 1556895600000 which is&amp;nbsp;3 May 2019 15:00:00 UTC there will be an error. So what you are seeing is currently expected.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;A workaround for this is to use datetime properties instead. Datetime properties can only be created via API (e.g. &lt;A href="https://developers.hubspot.com/docs/methods/deals/create_deal_property" target="_self"&gt;create deal property API&lt;/A&gt;) and with this you can store any timestamps that is based on your preferred timezone.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You can read more about this behavior here&amp;nbsp;&lt;A href="https://developers.hubspot.com/docs/faq/how-should-timestamps-be-formatted-for-hubspots-apis" target="_blank"&gt;https://developers.hubspot.com/docs/faq/how-should-timestamps-be-formatted-for-hubspots-apis&lt;/A&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 03 May 2019 07:33:58 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/APIs-Integrations/Major-issue-with-timezone-on-stored-dates/m-p/268302#M24161</guid>
      <dc:creator>JasminLin</dc:creator>
      <dc:date>2019-05-03T07:33:58Z</dc:date>
    </item>
  </channel>
</rss>

