CMS Development

mnorman
Member

local_dt HUBL variable is returning date an email was scheduled

We're using local_dt to get the date and time an email is sent. This has been working fine for us as most of our emails are not scheduled. However, we had an email that was scheduled yesterday to send this morning, and local_dt output yesterday's date instead. We did some further testing and found out that in fact, the date and time an email is scheduled locks in as the local_dt value.

 

It doesn't seem like that should be the case. The documentation doesn't note that:

"A datetime object of the current time in the time zone defined in your Report Settings."

 

It seems like the expected value of local_dt should be the date and time the email is sent.

 

We had been looking at using content.publish_date, but that caused issues with our RSS emails.

 

Is this a bug? Is there a better way to get the send date of the email?

0 Upvotes
2 Replies 2
ShibajiCh
Participant

local_dt HUBL variable is returning date an email was scheduled

I'm also facing the same issue. Please advise.

0 Upvotes
Jaycee_Lewis
Community Manager
Community Manager

local_dt HUBL variable is returning date an email was scheduled

Hi, @mnorman 👋 Thanks for reaching out. Hey, @BarryGrennan @miljkovicmisa, do you have any HubL-related troubleshooting wisdom you can share with @mnorman?

 

Thank you! — Jaycee

linkedin

Jaycee Lewis

Developer Community Manager

Community | HubSpot

0 Upvotes