Change timezone


Is there anyway to change the timezone for my server? Looks like these run PST and I am in the east.


I hope I’m not wrong but I think this article will help you.


Thanks. That appears to be for the web, what about the server itself? Having to code things in cron for a different timzeone is a pita. I’ll search the wiki - thanks for the idea.


Try this:



If you also want to change the timezone in the shell, the thing you’ll want to tweak is the TZ environment variable. The technique is described here.


Thanks. I know how to use cron, and how to change it in a shell, but I want to change it on the server. So when I do a date command, it shows the time in my timezone (that’s just an example). Is this possible, or does DH force us to use PST?


As Alpicola said:

For example:

[tea] ~ $ date
Sat Apr 26 05:46:27 PDT 2008
[tea] ~ $ export TZ="/usr/share/zoneinfo/Europe/Berlin"
[tea] ~ $ date
Sat Apr 26 14:46:44 CEST 2008
[tea] ~ $

You have to append the export TZ="/usr/share/zoneinfo/Europe/Berlin" to your /home/USER/.bashrc file. To get a list of possible timezones take a look at /usr/share/zoneinfo

DH is located in Los Angeles and for that matter it’s only logical to have the servers set to their timezone. The are maybe 200 other users on the server with you and they might not want to be stuck to EST.


Promo-Code: [color=#CC0000]SAVEMONEY97[/color] - Save [color=#CC0000]$50[/color] on your first year of hosting.
Get more promo codes here


Did you look at the man page about setting TZ? It’s in the link I posted.

You can’t change it on the server since it’s shared.



I’m in a ps server, so I would hope that allows me to change it, but maybe I’m wrong. I understand how to change it in a script, but having to remember what timezone I’m in when using cron is a pita. If possible, I’d like to make it EDT.


This is probably something that only support can answer for you, but I find it helpful to remember that the server is maintained by Dreamhost and not us, even on PS servers. They are the ones running as root and updating the OS and such. It may be a matter of policy that all vservers they manage are set to the same timezone to ensure that their maintenance scripts and panel stuff doesn’t have to worry about servers being on different timezones.

Use the [color=#CC0000]3DOM50[/color] promo code for 3 extra lifetime domains and $50 off
More Dreamhost coupons here!


I also run a (root) VPS with another host, right now it’s running with Xen, previously I was using vserver-ctx (what DH is using for it’s PS) and as far as I know the time of your virtual server is controlled by the physical host system, with both VPS technologies.


Promo-Code: [color=#CC0000]SAVEMONEY97[/color] - Save [color=#CC0000]$50[/color] on your first year of hosting.
Get more promo codes here