APIs & Integrations

Renegade
Top Contributor

'formatDate' template

SOLVE

When updating a Timeline event (which includes a template utilizing the "formatDate"  text formatter as described  here ) with the current time, it seems that the time I provide as UTC (in ms) is getting converted to EST instead of the user/client local time zone.  (When I initially create the event in the timeline, the correct local time is displayed.)

 

Is this an error in the Hubspot API, or am I doing something wrong?

0 Upvotes
1 Accepted solution
IsaacTakushi
Solution
HubSpot Employee
HubSpot Employee

'formatDate' template

SOLVE

Hi, @Renegade.

 

The timestamp in the upper right corner of a timeline event appears to reflect your device or browser's time zone while the formatted timestamp in an event's details uses your account time zone.

 

Time zone differences.jpg

Is this the difference you're referring to?

 

Regarding the error message, I assume you're referring to developer test account 5771778? You're seeing that error because the Enterprise trials have expired. You can Renew the account's tools on this page in your developer account.

Isaac Takushi

Associate Certification Manager

View solution in original post

0 Upvotes
21 Replies 21
IsaacTakushi
HubSpot Employee
HubSpot Employee

'formatDate' template

SOLVE

Hi, @Renegade.

 

I'd like to dig into this further. Could you share the following?

  1. Your app ID.
  2. The ID of an event type exhibiting this behavior.
  3. An example request to this endpoint containing the UTC millisecond timestamp.
  4. A link to a record showing the resultant EST time.

Isaac Takushi

Associate Certification Manager
0 Upvotes
Renegade
Top Contributor

'formatDate' template

SOLVE

Thanks.

 

a) Do you want me to post this private data here or to you?

b) How do I share an "example request"?  Perhaps you are asking for the data elements in the request?

c) What do you mean by a "link to a record showing the time"?

d) Shouldn't you only need an event ID (which should show a UTC time) and perhaps a screenshot of the displayed time?

0 Upvotes
IsaacTakushi
HubSpot Employee
HubSpot Employee

'formatDate' template

SOLVE

Hi, @Renegade.

 

It is fine to post this information here (as long as emails, access tokens, and API keys are redacted), but if you're more comfortable direct messaging me, feel free.

 

By "example request," I meant an example request URL and payload. By a link to a record, I meant a link to the object record in you account corresponding to the example request.

 

An event ID is fine as long as I also have your application ID and event type ID.

Isaac Takushi

Associate Certification Manager
0 Upvotes
Renegade
Top Contributor

'formatDate' template

SOLVE

OK.  Well, here is everything below (not sure if #4 is what you want).  Also, I've included a screenshot of the timeline event containing both the time of event creation and the time of the later update which isn't displaying correctly (in the provided example, the updated time should also be 1:09PM).

 


IMPORTANT NOTE CONCERNING A DIFFERENT PROBLEM:  If I attempt to edit this post, it is simply deleted and I have to re-post it.

 


1) 192935

2) 390583

3)  URL = https://api.hubapi.com/integrations/v1/192935/timeline/event
PAYLOAD =

"id": "b0cb0127-c280-4681-84c1-9884d658c433",
"eventTypeId": "390583",
"deliveryStatus": "Pending...",
"timeStatus": 1563480431000,
"objectId": "101",
"phoneNumber_To": "(602) 751-8818",
"phoneNumber_From": "(602)751-8807",
"messageTitle": "Icky Icky Cocoa Pop"
4) https://app.hubspot.com/contacts/5771778/contact/101/

 

Capture.PNG

0 Upvotes
Renegade
Top Contributor

'formatDate' template

SOLVE

(Seems like another problem with the forum.  You have that long post from two weeks ago showing up again today in duplicate as a "new" post at the bottom, yet displaying a date of two weeks ago.)

0 Upvotes
IsaacTakushi
HubSpot Employee
HubSpot Employee

'formatDate' template

SOLVE

Hey, @Renegade.

 

literally just noticed that as well a couple minutes ago.

 

I haven't had a chance to follow up on the renew button behavior yet, but it's on my list.

Isaac Takushi

Associate Certification Manager
0 Upvotes
IsaacTakushi
HubSpot Employee
HubSpot Employee

'formatDate' template

SOLVE

Hi, @Renegade.

 

We've been chatting via direct message, but I wanted to update here as well.

 

We were able to restore Enterprise tools to your developer test account. You should now be able to access workflows and test the Timeline Events API behavior we discussed above.

Isaac Takushi

Associate Certification Manager
0 Upvotes
Renegade
Top Contributor

'formatDate' template

SOLVE

Alright!  Finally got back on track and was able to test this.  Your explanation of the display times in the timeline clarified everything, and all is working properly now.  There were a couple of things going on here that made this relatively simple issue a little tricky to track down.  I thought I'd bring them up here in case someone down the line has a similar issue and stumbles onto this post...

 

1.  The difference between the mechanisms used to display the "event creation" and "event update" times can cause some confusion.  I'm not sure if there is a reason for this, but perhaps they should both be generated via the same mechanism to avoid such problems?

 

2.  After updating the time zone for a user account, there is a significant delay (30 minutes?) before it affects the displays.  If one is unaware of such a delay and is in the middle of debugging the time values, it can get a little precarious.  LOL

 

Thank you for your help with this issue (and the several ancillary problems arising from it).

IsaacTakushi
HubSpot Employee
HubSpot Employee

'formatDate' template

SOLVE

Hey, @Renegade.

 

Happy I could help! Thanks for sharing this feedback as well; it's super valuable.

Isaac Takushi

Associate Certification Manager
0 Upvotes
Renegade
Top Contributor

'formatDate' template

SOLVE

Thanks again, Isaac.  I'd like to give you my response, but...

 

?????????????????????

 

... I keep posting my reply here, and this forum keeps deleting it.  It shows as successfully posted on the update page, but when I open the topic from the main page, it is gone.

 

a) Sometimes I get a message that I should "correct the highlighted errors" (of which there are none).

b) Sometimes I do not get such a message and it "works".  Only to be missing again when the topic is reloaded.

 

Apparently there is something in that post that the forum doesn't like.  However, it simply contains some quotations and a couple of links - neither of which should be a problem.  And if there were a problem, why not state what it is?

 

I've had this happen several times over the past month.  How can such an error exist for this long unresolved?

0 Upvotes
Renegade
Top Contributor

'formatDate' template

SOLVE

Wow, getting stranger now!  Today I see that the reply I have been attempting to post (the one containing the information that Isaac requested) finally appeared in this thread, after three days.

 

Well, anyway, sorry for the delay, Isaac.  But is that the data you needed?

0 Upvotes
IsaacTakushi
HubSpot Employee
HubSpot Employee

'formatDate' template

SOLVE

Hey, @Renegade.

 

Apologies for the delay on my end.

 

Yes, that is exactly the information I need — I'll be investigating further today!

 

The Community's spam filter is a bit touchy and sometimes doesn't like multiple links and code blocks in a single post, so apologies for the frustration. I'll keep a closer eye on the quarantine folder.

Isaac Takushi

Associate Certification Manager
0 Upvotes
IsaacTakushi
HubSpot Employee
HubSpot Employee

'formatDate' template

SOLVE

Hey, @Renegade.

 

No updates yet, but I'm still investigating. Thanks for your patience.

Isaac Takushi

Associate Certification Manager
0 Upvotes
IsaacTakushi
HubSpot Employee
HubSpot Employee

'formatDate' template

SOLVE

Hi, @Renegade.

 

Apologies for the delayed response; I was out of office yesterday.

 

I haven't been able to reproduce the behavior in my own account. Here are the steps I took.

 

1. I created a timeline event type with the following payload:

{
    "id": 001,
    "name": "Custom Timeline Event",
    "headerTemplate": "Triggered a Timeline Event",
    "detailTemplate": "The event happened at {{#formatDate timeStatus}}{{/formatDate}}",
    "applicationId": 123987,
    "objectType": "CONTACT"
  }

2. I changed my HubSpot account and computer's time zone from UTC -4:00 (EDT) to UTC -10:00 (HST).

3. I created the event using this payload:

{
  "id":"123",
  "eventTypeId":"001",
  "objectId":1,
  "timeStatus": "1564090265137"
}

Here is how it appeared on the contact timeline:

New Event.png

4. I then updated the event using this payload:

{
  "id":"123",
  "eventTypeId":"001",
  "objectId":"1",
  "timeStatus": "1564090310665"
}

Here is how it appears on the contact timeline:

Updated Event.png

The updated timestamp still reflects the UTC -10:00 (HST) time zone. Am I missing a step you're taking?

Isaac Takushi

Associate Certification Manager
0 Upvotes
Renegade
Top Contributor

'formatDate' template

SOLVE

Perhaps my problem is due to having the wrong time zone set for the account (EST).  However, if this is the case, why does the time that the event is created show up in the timeline in my local (Mountain) time?

 

And by the way, the reason I haven't confirmed this is because all of a sudden I am getting locked out of workflows functionality with messages like "this account doesn't have access to marketing actions" and "this action requires an Enterprise package", which I don't understand, since it is a test account tied to my developer account.

0 Upvotes
IsaacTakushi
Solution
HubSpot Employee
HubSpot Employee

'formatDate' template

SOLVE

Hi, @Renegade.

 

The timestamp in the upper right corner of a timeline event appears to reflect your device or browser's time zone while the formatted timestamp in an event's details uses your account time zone.

 

Time zone differences.jpg

Is this the difference you're referring to?

 

Regarding the error message, I assume you're referring to developer test account 5771778? You're seeing that error because the Enterprise trials have expired. You can Renew the account's tools on this page in your developer account.

Isaac Takushi

Associate Certification Manager
0 Upvotes
Renegade
Top Contributor

'formatDate' template

SOLVE

This all sounds good and I bet you are correct.  I am unable to test it though, as the "renew" functionality doesn't seem to be working properly (my previously working "workflows" configuration still shows errors and doesn't work).  I talked to someone in the chat for 20 minutes who mostly seemed confused.  Anyway, I will try to get that resolved so I can then resolve this.  LOL.

 

Thanks, Isaac!

0 Upvotes
IsaacTakushi
HubSpot Employee
HubSpot Employee

'formatDate' template

SOLVE

Hey, @Renegade.

 

I might be able to help here. Could you share the support ticket number?

 

I see that developer test account 5771778 has a renewed Sales Professional trial, but I would expect it to have Marketing EnterpriseSales Enterprise, and Service Enterprise trials if the Renew button worked correctly. Did you have to manually opt for a Sales Professional trial (after attempting to use the button)?

Isaac Takushi

Associate Certification Manager
0 Upvotes
Renegade
Top Contributor

'formatDate' template

SOLVE

I do not recall any such options.

 

The only thing I know of that might be causing you a problem is that BEFORE I used the "renew" button I responded to the little prompts that directed me to some kind of "trial version", and I clicked on that.  Later, I realized that I only needed to renew.

 

I don't know of any support ticket number.  I have a chat transcript with Ali, and I wrote to Elise by email and haven't heard back.

0 Upvotes
IsaacTakushi
HubSpot Employee
HubSpot Employee

'formatDate' template

SOLVE

Hi, @Renegade.

 

I'll work with the team to investigate the renew button. I too am not able to restore Marketing Hub or Service Hub Enterprise trials to my main developer test account, in which they've expired.

 

In contrast, clicking Renew in one of my other developer test accounts with active trials of MarketingSales, and Service Hub Enterprise refreshed all three Hubs.

 

I'm not sure who you might have spoken with from that detail. Can you direct message me their full names or emails?

Isaac Takushi

Associate Certification Manager
0 Upvotes