Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Right now, I have rsyslog handling a log for a PHP app. Well...I have PHP using rsyslog to do the logging. Currently, it logs time in UTC. I want it to log in EST/EDT as appropriate. How do I make that change?

For the record, the timezone is set correctly in PHP and on the OS. A point to note is that the OS is in a VM, although I don't know why that would make a difference as the host is also in EDT.

share|improve this question

syslog inherit time zone from the system so you should add desired TZ value to syslog process environment.

echo 'export TZ="EDT"' >> /etc/default/rsyslog
restart rsyslog
share|improve this answer
Tried that. Still logging in UTC. – Chad Aug 24 '12 at 15:38
are you sure I've just tried an it works – hostmaster Aug 24 '12 at 15:45
this is my output – hostmaster Aug 24 '12 at 15:56
date() shows the correct time. syslog does not. In the log file its still printing time like this: [24-Aug-2012 15:35:56 UTC] – Chad Aug 24 '12 at 16:10
rsyslog actuialy doesn't print Time Zone in the log file. What is the name of the file you are talking about ? – hostmaster Aug 24 '12 at 19:51

Your Answer


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.