# Current date and time in timezone

**URL:** <https://community.hubspot.com/t/current-date-and-time-in-timezone/74693>\
**Category:** CMS Development\
**Tags:** local-development\
**Created:** [February 8, 2023, 3:59am UTC](https://community.hubspot.com/t/current-date-and-time-in-timezone/74693 "2023-02-08T03:59:50Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![JBrake](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/jbrake/32/76513_2.png) [@JBrake](https://community.hubspot.com/u/JBrake)\
**Post date:** [February 8, 2023, 3:59am UTC](https://community.hubspot.com/t/current-date-and-time-in-timezone/74693/1 "2023-02-08T03:59:50Z")

</div>

I am looking for a way to get the current time in a time zone, for purposes of checking a certain time has passed in that time zone. e.g. An event has already started or ended on this day in a certain timezone.

“today(‘Pacific/Auckland’)” provides the current day at 12:00AM and not the current time.

“to\_local\_time” and “local\_dt” are base on the timezone setting of your portal, not a specified time zone.

Advice appreciated.

---

<div class="post-metadata">

**Author:** ![BarryGrennan](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/barrygrennan/32/97794_2.png) [@BarryGrennan](https://community.hubspot.com/u/BarryGrennan)\
**Post date:** [February 8, 2023, 3:13pm UTC](https://community.hubspot.com/t/current-date-and-time-in-timezone/74693/2 "2023-02-08T15:13:51Z")

</div>

Hi @JBrake

`{{local_dt | format_datetime('medium', 'Pacific/Auckland')}}`

or

`{{local_dt | format_time('medium', 'Pacific/Auckland')}}`

should do the trick.

See [here](https://developers.hubspot.com/docs/cms/hubl/filters#format-datetime) for more details

* * *

 ![profile2022a.jpg](https://d2qpr2jzcazej7.cloudfront.net/original/2X/7/7273a34ccfe3489fceebc8a36eca751481b59531.jpeg)

**Barry Grennan**

[Freelance HubSpot CMS Developer](https://www.seoanseo.ca?utm_source=HubSpotCommunity)

[Website](https://www.seoanseo.ca?utm_source=HubSpotCommunity) | [Contact](https://www.seoanseo.ca/#contact?utm_source=HubSpotCommunity) | [LinkedIn](https://www.linkedin.com/in/barrygrennan)

---

<div class="post-metadata">

**Author:** ![JBrake](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/jbrake/32/76513_2.png) [@JBrake](https://community.hubspot.com/u/JBrake)\
**Post date:** [February 8, 2023, 10:01pm UTC](https://community.hubspot.com/t/current-date-and-time-in-timezone/74693/3 "2023-02-08T22:01:53Z")

</div>

Woot! Thanks Barry… so obvious to me now! Hopefully the Regaine kicks in soon…
