Hi everyone!
I need to add a column with date and time to my HubDB table. But the problem is that the data is displayed in UTC 00:00 time zone.
At the same time, in my account defaults settings, I specified the time zone which I needed (EST -05:00)
How can I make HubDB display the EST time zone initially?
HubDB
Account Default Setting
Hi, @tony_newday
Thanks for reaching out! Hey, @BarryGrennan, do you have any thoughts here?
Best,
Jaycee
The account defaults would have no bearing on HubDB event times, I think what you’d want to do is subtract the ammount of time in unix.
So if you’re outputting your event details like:
{% for row in hubdb_table_rows(module.hubdbtable_field) %}
{{row.event_title}} starts at {{row.start_time|format_time('hh:mm a')}}<br>
{% endfor %}
change it to something like:
{% for row in hubdb_table_rows(module.hubdbtable_field) %}
{{row.event_title}} starts at{{(row.start_time-(3600000 * 5))|format_time('hh:mm a')}}<br>
{% endfor %}
Edit: Although, now that I think about it, the question assumes that the person filling out the HubDB table is actually setting the UTC time of the event. What I mean is that in your screen shot where you have the event starting at 1pm {{row.start_time|format_time(‘hh:mm a’)}} would just print out 1pm, it’s not relevant if it’s 1pm UTC or EST -5
If I’m missing the mark here, please expand upon what you’re trying to achieve and why this is an issue.
Barry Grennan
Freelance HubSpot CMS Developer
Website | Contact | LinkedIn