0

This is more like a request for confirmation than a question. I'm passing data from Hubspot to a sheet by using Google Apps Scripts, but I'm getting a one hour difference in dates when in Hubspot vs in the Sheets.

Platform dates configurations

Hubspot: Central Time

Sheets: Central Time

Apps Scripts: Central Time

As daylight saving time is on today march 18 2018, GMT would be -05:00 for all of the above platforms.

Hubspot stores dates as UTC and displays them with the Time Zone configured. For example, I got a date that is displayed in Hubspot as "02/22/2017 1:35 PM GMT-5".

But when setting it in a sheet via Apps Scripts it ends up as "2/22/2017 12:35:43", I'm wondering why the difference. I guess it's because Apps Scripts takes the UTC date and considers that date as a no-daylight saving date, hence saves the date as GMT-06:00 (daylight saving time started on march 12 on 2017). But Hubspot just displays it without considering this.

Am I correct into thinking this?

Manuel
  • 478
  • 8
  • 20
  • Without seeing your Date handling code, I'm not sure what you're looking for here. – tehhowch Mar 18 '18 at 22:52
  • 2
    A UTC date never has daylight saving, it's a reference time that's used to determine the time for various timezones with various offsets from UTC. "02/22/2017 1:35 PM GMT-5" is 2017-02-22T18:35:00Z (UTC). Where a particular place goes in and out of daylight saving, it has a different offset and the timezone is given a different name. US "Central Time" (aka Central Standard Time or CST) is typically called "Central Daylight Time" (CDT) during the period of daylight saving. Have you tried changing the platform configuration to CDT? – RobG Mar 19 '18 at 01:53
  • That change in the name is interesting to know. Actually there is no CDT, only Joda-style timezones (e.g. 'America/New_York') http://joda-time.sourceforge.net/timezones.html – Manuel Mar 19 '18 at 18:29

0 Answers0