When a deal is created, the Create Date seems to be set to 12:00am UTC of that day. However, because a time of day was set, the date then displays adjusted for your timezone, so in the US, that ends up displaying as the proir day (so off by a day on in the date) at whatever negative shift of hours the timezone is from UTC.
It seems like it would be way better to store the actual time information including time of day, so that the date would display properly regardless of time zone. The actual time is already being stored in the property history, so why not just populate that in the value?
Why is this how it is currently set up? I don't really see a benifit, as your not just throwing out data, but overwritting it with incorrect data, and it results in the incorrect date being displayed.
Hi @GregP ! The only time I've seen the date be set in that way is if the deal is being created via the API, in which case if you don't provide a timestamp and then also offset that by the correct number of hours based on your local timezone, it tends to display it the way you've described.
However, if you create a deal from within the UI, it does capture the time automatically, like so:
Can you confirm how you're creating these deals today?
Of note: within the GUI you can only create customdatetype properties, and not customdateTimetype properties. You can however create customdateTimetype properties via API.
If the property is adatetype property, then the displayed date assumes GMT as the timezone, and entirely ingnores your timezone settings. This can result in the date displaying as off by a day if the timecode falls in the difference between your timezone and GMT.
If the property is adateTimetype property, then the displayed date will use your timezone settings, and will generally act as one would expect.
For custom properties, if you can, I would highly suggest creating all of your date properties asdateTimetype via API, if you have any integrations, or even the slightest chance of using integrations down the line. Unfortunately dateTimetype properties cannot be created via the normal GUI at this time.
Create Date is a dateTimetype, so I think the issue I was having with that was from inconsitencies in the documentation with timestamp formats; but with default HubSpot properties you never know — they have inconsistent code all over the place.
Of note: within the GUI you can only create customdatetype properties, and not customdateTimetype properties. You can however create customdateTimetype properties via API.
If the property is adatetype property, then the displayed date assumes GMT as the timezone, and entirely ingnores your timezone settings. This can result in the date displaying as off by a day if the timecode falls in the difference between your timezone and GMT.
If the property is adateTimetype property, then the displayed date will use your timezone settings, and will generally act as one would expect.
For custom properties, if you can, I would highly suggest creating all of your date properties asdateTimetype via API, if you have any integrations, or even the slightest chance of using integrations down the line. Unfortunately dateTimetype properties cannot be created via the normal GUI at this time.
Create Date is a dateTimetype, so I think the issue I was having with that was from inconsitencies in the documentation with timestamp formats; but with default HubSpot properties you never know — they have inconsistent code all over the place.
Ah, okay, thanks for that clarification. That does look to be the issue, as we have some deals created manually and some via API. The manual ones are displaying fine. We just happened to only look at deals that had been created by the API. I'll be sure to get the API created ones set up properly for moving forward.
It's still interesting that the timestamp on the property history stores the time properly, so it seems like HubSpot could have the ability to set this with the adjusted time without having to manually post it.
Hi @GregP ! The only time I've seen the date be set in that way is if the deal is being created via the API, in which case if you don't provide a timestamp and then also offset that by the correct number of hours based on your local timezone, it tends to display it the way you've described.
However, if you create a deal from within the UI, it does capture the time automatically, like so:
Can you confirm how you're creating these deals today?