Take the 2-minute tour ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

I have configured the timezone in my servers for a custom timezone (America/Mexico_city) by creating a dynamic link in /etc/localtime.

Nevertheless, every now and then and with no apparent reason, my timezone goes back to default (PST) and my services start failing.

I'm using HP Cloud services.

Has anybody else experienced this?

share|improve this question
    
Does /etc/timezone perhaps contain the name of the default timezone? I don't know how it is in CentOS but it could be that /etc/localtime is periodically regenerated from the contents of /etc/timezone. –  Celada Jun 26 '12 at 3:11
    
@Celada Why not phrase this as an answer? In my case there is no /etc/timezone –  jeremyclarke Oct 2 '14 at 18:14
    
I didn't phrase it as an answer @jeremyclarke because it is a bit of a wild guess I was just hoping might be lucky. Based on the fact that you are saying that your system does not have a /etc/timezone the guess is probably a miss. –  Celada Oct 2 '14 at 22:41

1 Answer 1

Setting the timzezone via /etc/localtime symlinks should be avoided. CentOS 6 gets timezone settings from /etc/sysconfig/clock

/etc/localtime will get updated if one of the time config scripts is run.

Timezones can also be overridden in scripts by setting/exporting a TIMEZONE variable. You can always set an explicit TIMEZONE in the start-up script of a service that is sensitive to TZ changes.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.