Change timezone


#1

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


#2

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


#3

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.


#4

Try this:
http://www.daemon-systems.org/man/crontab.5.html

-Scott


#5

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.


#6

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?


#7

As Alpicola said: http://www.cyberciti.biz/faq/howto-linux-set-time-zone-per-user-basis/

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.

Jan

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


#8

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.

-Scott


#9

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.


#10

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!


#11

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.

Jan

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