# Display local and UTC time in Date/Time area

**URL:** <https://community.tempest.earth/t/display-local-and-utc-time-in-date-time-area/10415>\
**Category:** General\
**Created:** [November 22, 2020, 9:46pm UTC](https://community.tempest.earth/t/display-local-and-utc-time-in-date-time-area/10415 "2020-11-22T21:46:19Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![bruce4](https://avatars.discourse-cdn.com/v4/letter/b/65b543/32.png) [@bruce4](https://community.tempest.earth/u/bruce4)\
**Post date:** [November 22, 2020, 9:46pm UTC](https://community.tempest.earth/t/display-local-and-utc-time-in-date-time-area/10415/1 "2020-11-22T21:46:20Z")

</div>

I am needing to display both Local (based on TZ) and UTC time in the Date/Time area. See example.

Original code:

# Get current time in station time zone

```
Tz = pytz.timezone(Config['Station']['Timezone'])
Now = datetime.now(pytz.utc).astimezone(Tz)

```

I added:  
NowUTC = datetime.now(pytz.utc)

If I use " Now = datetime.now(pytz.utc)" it displays UTC time correctly. Can someone point me to where I can add this to the display?

---

<div class="post-metadata">

**Author:** ![GaryFunk](https://sea2.discourse-cdn.com/flex020/user_avatar/community.tempest.earth/garyfunk/32/5729_2.png) [@GaryFunk](https://community.tempest.earth/u/GaryFunk)\
**Post date:** [November 23, 2020, 2:55am UTC](https://community.tempest.earth/t/display-local-and-utc-time-in-date-time-area/10415/2 "2020-11-23T02:55:18Z")

</div>

3 posts were merged into an existing topic: [WeatherFlow PiConsole](https://community.tempest.earth/t/weatherflow-piconsole/1933)

---

<div class="post-metadata">

**Author:** ![GaryFunk](https://sea2.discourse-cdn.com/flex020/user_avatar/community.tempest.earth/garyfunk/32/5729_2.png) [@GaryFunk](https://community.tempest.earth/u/GaryFunk)\
**Post date:** [November 23, 2020, 2:55am UTC](https://community.tempest.earth/t/display-local-and-utc-time-in-date-time-area/10415/3 "2020-11-23T02:55:18Z")

</div>


