# How to set the timezone?

**URL:** <https://forums.suse.com/t/how-to-set-the-timezone/1693>\
**Category:** RancherOS\
**Created:** [February 11, 2016, 8:54am UTC](https://forums.suse.com/t/how-to-set-the-timezone/1693 "2016-02-11T08:54:22Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![lscpo](https://avatars.discourse-cdn.com/v4/letter/l/3ab097/32.png) [@lscpo](https://forums.suse.com/u/lscpo)\
**Post date:** [February 11, 2016, 8:54am UTC](https://forums.suse.com/t/how-to-set-the-timezone/1693/1 "2016-02-11T08:54:22Z")

</div>

Hey,  
I got stuck trying to set the timezone. Could anybody lead me to the right direction where and how to set it up?  
Thank you.

---

<div class="post-metadata">

**Author:** ![ryansch](https://sea2.discourse-cdn.com/flex022/user_avatar/forums.suse.com/ryansch/32/817_2.png) [@ryansch](https://forums.suse.com/u/ryansch)\
**Post date:** [February 12, 2016, 12:21am UTC](https://forums.suse.com/t/how-to-set-the-timezone/1693/2 "2016-02-12T00:21:05Z")

</div>

What’s your use case? Generally servers should run in UTC.

---

<div class="post-metadata">

**Author:** ![lscpo](https://avatars.discourse-cdn.com/v4/letter/l/3ab097/32.png) [@lscpo](https://forums.suse.com/u/lscpo)\
**Post date:** [February 12, 2016, 9:35am UTC](https://forums.suse.com/t/how-to-set-the-timezone/1693/3 "2016-02-12T09:35:29Z")

</div>

I have a small golang project running tasks periodically. The server is for my personal use only, so it doesn’t really matter to me, if changing the timezone might not be best practice. It would help me not always get confused when reading logfiles. 😄

---

<div class="post-metadata">

**Author:** ![ryansch](https://sea2.discourse-cdn.com/flex022/user_avatar/forums.suse.com/ryansch/32/817_2.png) [@ryansch](https://forums.suse.com/u/ryansch)\
**Post date:** [February 12, 2016, 6:37pm UTC](https://forums.suse.com/t/how-to-set-the-timezone/1693/4 "2016-02-12T18:37:16Z")

</div>

Honestly when you factor in the issues with DST I’d just run `date -u` on your host system to get the current UTC time to reference the logs. Failing that: I have no idea how to change the timezone.

---

<div class="post-metadata">

**Author:** ![demarant](https://sea2.discourse-cdn.com/flex022/user_avatar/forums.suse.com/demarant/32/497_2.png) [@demarant](https://forums.suse.com/u/demarant)\
**Post date:** [August 5, 2016, 6:10pm UTC](https://forums.suse.com/t/how-to-set-the-timezone/1693/5 "2016-08-05T18:10:25Z")

</div>

You could set the environment variable like TZ=Europe/London

For example

$ sudo docker run -i -t -e TZ=Europe/London centos /bin/bash  
[root@3a778f0 /]# date  
Fri Nov 27 17:10:18 GMT 2015

---

<div class="post-metadata">

**Author:** ![alysum](https://sea2.discourse-cdn.com/flex022/user_avatar/forums.suse.com/alysum/32/3087_2.png) [@alysum](https://forums.suse.com/u/alysum)\
**Post date:** [November 29, 2017, 12:49am UTC](https://forums.suse.com/t/how-to-set-the-timezone/1693/6 "2017-11-29T00:49:47Z")

</div>

I’ve set the env var TZ in Rancher Server but it does not reflect in the logs which are still UTC… is this normal ?
