# 'formatDate' template

**URL:** <https://community.hubspot.com/t/formatdate-template/15344>\
**Category:** APIs & Integrations\
**Tags:** timeline-and-extensions-apis\
**Created:** [July 17, 2019, 5:47am UTC](https://community.hubspot.com/t/formatdate-template/15344 "2019-07-17T05:47:52Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![Renegade](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/renegade/32/75439_2.png) [@Renegade](https://community.hubspot.com/u/Renegade)\
**Post date:** [July 17, 2019, 5:47am UTC](https://community.hubspot.com/t/formatdate-template/15344/1 "2019-07-17T05:47:52Z")

</div>

When updating a Timeline event (which includes a template utilizing the “formatDate” text formatter as described [here](https://developers.hubspot.com/docs/methods/timeline/timeline-template-rendering) ) 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?

---

<div class="post-metadata">

**Author:** ![IsaacTakushi](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/isaactakushi/32/70387_2.png) [@IsaacTakushi](https://community.hubspot.com/u/IsaacTakushi)\
**Post date:** [July 18, 2019, 6:06pm UTC](https://community.hubspot.com/t/formatdate-template/15344/2 "2019-07-18T18:06:58Z")

</div>

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](https://developers.hubspot.com/docs/methods/timeline/create-or-update-event) containing the UTC millisecond timestamp.
4. A link to a record showing the resultant EST time.

---

<div class="post-metadata">

**Author:** ![Renegade](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/renegade/32/75439_2.png) [@Renegade](https://community.hubspot.com/u/Renegade)\
**Post date:** [July 18, 2019, 8:16pm UTC](https://community.hubspot.com/t/formatdate-template/15344/3 "2019-07-18T20:16:19Z")

</div>

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?

---

<div class="post-metadata">

**Author:** ![IsaacTakushi](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/isaactakushi/32/70387_2.png) [@IsaacTakushi](https://community.hubspot.com/u/IsaacTakushi)\
**Post date:** [July 19, 2019, 9:51pm UTC](https://community.hubspot.com/t/formatdate-template/15344/4 "2019-07-19T21:51:48Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![Renegade](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/renegade/32/75439_2.png) [@Renegade](https://community.hubspot.com/u/Renegade)\
**Post date:** [July 19, 2019, 10:11pm UTC](https://community.hubspot.com/t/formatdate-template/15344/5 "2019-07-19T22:11:25Z")

</div>

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.

1. 192935

2. 390583

1. 

`https://api.hubapi.com/integrations/v1/192935/timeline/event`

{  
“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. [HubSpot](https://app.hubspot.com/contacts/5771778/contact/101/)

 ![Capture.PNG](https://d2qpr2jzcazej7.cloudfront.net/original/3X/8/4/84360c927fe946e2cd1318281fdda64f1ffcd18f.png)  
SCREEN SHOT

---

<div class="post-metadata">

**Author:** ![Renegade](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/renegade/32/75439_2.png) [@Renegade](https://community.hubspot.com/u/Renegade)\
**Post date:** [July 19, 2019, 11:41pm UTC](https://community.hubspot.com/t/formatdate-template/15344/6 "2019-07-19T23:41:41Z")

</div>

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?

---

<div class="post-metadata">

**Author:** ![Renegade](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/renegade/32/75439_2.png) [@Renegade](https://community.hubspot.com/u/Renegade)\
**Post date:** [July 22, 2019, 11:42pm UTC](https://community.hubspot.com/t/formatdate-template/15344/7 "2019-07-22T23:42:23Z")

</div>

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?

---

<div class="post-metadata">

**Author:** ![IsaacTakushi](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/isaactakushi/32/70387_2.png) [@IsaacTakushi](https://community.hubspot.com/u/IsaacTakushi)\
**Post date:** [July 23, 2019, 1:18pm UTC](https://community.hubspot.com/t/formatdate-template/15344/8 "2019-07-23T13:18:08Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![IsaacTakushi](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/isaactakushi/32/70387_2.png) [@IsaacTakushi](https://community.hubspot.com/u/IsaacTakushi)\
**Post date:** [July 24, 2019, 12:36am UTC](https://community.hubspot.com/t/formatdate-template/15344/9 "2019-07-24T00:36:57Z")

</div>

Hey, @Renegade.

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

---

<div class="post-metadata">

**Author:** ![IsaacTakushi](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/isaactakushi/32/70387_2.png) [@IsaacTakushi](https://community.hubspot.com/u/IsaacTakushi)\
**Post date:** [July 25, 2019, 9:52pm UTC](https://community.hubspot.com/t/formatdate-template/15344/10 "2019-07-25T21:52:28Z")

</div>

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:

```auto
{
 "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:

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

```

Here is how it appeared on the contact timeline:

 ![New Event.png](https://d2qpr2jzcazej7.cloudfront.net/original/3X/6/e/6e5efb90b65cccf1379f3ab11be7ac3cfb2075d7.png)

4. I then updated the event using this payload:

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

```

Here is how it appears on the contact timeline:

 ![Updated Event.png](https://d2qpr2jzcazej7.cloudfront.net/original/3X/e/f/ef7d1443da86df31b8950ce5da28d97f2db3c49d.png)

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

---

<div class="post-metadata">

**Author:** ![Renegade](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/renegade/32/75439_2.png) [@Renegade](https://community.hubspot.com/u/Renegade)\
**Post date:** [July 26, 2019, 1:01am UTC](https://community.hubspot.com/t/formatdate-template/15344/11 "2019-07-26T01:01:49Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![IsaacTakushi](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/isaactakushi/32/70387_2.png) [@IsaacTakushi](https://community.hubspot.com/u/IsaacTakushi)\
**Post date:** [July 26, 2019, 6:18pm UTC](https://community.hubspot.com/t/formatdate-template/15344/12 "2019-07-26T18:18:27Z")

</div>

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](https://d2qpr2jzcazej7.cloudfront.net/original/3X/5/a/5a2efc904acdd6a69b28ae90a6a9dee41a2d5ee1.jpeg)

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](https://app.hubspot.com/developer/5643817/test-hub-ids) in your developer account.

---

<div class="post-metadata">

**Author:** ![Renegade](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/renegade/32/75439_2.png) [@Renegade](https://community.hubspot.com/u/Renegade)\
**Post date:** [July 26, 2019, 9:55pm UTC](https://community.hubspot.com/t/formatdate-template/15344/13 "2019-07-26T21:55:15Z")

</div>

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!

---

<div class="post-metadata">

**Author:** ![IsaacTakushi](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/isaactakushi/32/70387_2.png) [@IsaacTakushi](https://community.hubspot.com/u/IsaacTakushi)\
**Post date:** [July 29, 2019, 12:08pm UTC](https://community.hubspot.com/t/formatdate-template/15344/14 "2019-07-29T12:08:40Z")

</div>

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 Enterprise_, _Sales 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)?

---

<div class="post-metadata">

**Author:** ![Renegade](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/renegade/32/75439_2.png) [@Renegade](https://community.hubspot.com/u/Renegade)\
**Post date:** [July 29, 2019, 5:27pm UTC](https://community.hubspot.com/t/formatdate-template/15344/15 "2019-07-29T17:27:45Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![IsaacTakushi](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/isaactakushi/32/70387_2.png) [@IsaacTakushi](https://community.hubspot.com/u/IsaacTakushi)\
**Post date:** [July 30, 2019, 11:26pm UTC](https://community.hubspot.com/t/formatdate-template/15344/16 "2019-07-30T23:26:20Z")

</div>

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 _Marketing_, _Sales_, 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?

---

<div class="post-metadata">

**Author:** ![Renegade](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/renegade/32/75439_2.png) [@Renegade](https://community.hubspot.com/u/Renegade)\
**Post date:** [July 20, 2019, 12:11am UTC](https://community.hubspot.com/t/formatdate-template/15344/17 "2019-07-20T00:11:06Z")

</div>

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](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) [HubSpot](https://app.hubspot.com/contacts/5771778/contact/101/)

 ![Capture.PNG](https://d2qpr2jzcazej7.cloudfront.net/original/3X/8/4/84360c927fe946e2cd1318281fdda64f1ffcd18f.png)

---

<div class="post-metadata">

**Author:** ![Renegade](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/renegade/32/75439_2.png) [@Renegade](https://community.hubspot.com/u/Renegade)\
**Post date:** [July 31, 2019, 6:16pm UTC](https://community.hubspot.com/t/formatdate-template/15344/18 "2019-07-31T18:16:41Z")

</div>

(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.)

---

<div class="post-metadata">

**Author:** ![IsaacTakushi](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/isaactakushi/32/70387_2.png) [@IsaacTakushi](https://community.hubspot.com/u/IsaacTakushi)\
**Post date:** [July 31, 2019, 6:21pm UTC](https://community.hubspot.com/t/formatdate-template/15344/19 "2019-07-31T18:21:44Z")

</div>

Hey, @Renegade.

I _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.

---

<div class="post-metadata">

**Author:** ![IsaacTakushi](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/isaactakushi/32/70387_2.png) [@IsaacTakushi](https://community.hubspot.com/u/IsaacTakushi)\
**Post date:** [August 9, 2019, 8:24pm UTC](https://community.hubspot.com/t/formatdate-template/15344/20 "2019-08-09T20:24:01Z")

</div>

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.

[Next page](https://community.hubspot.com/t/formatdate-template/15344.md?page=2)
