How to log the time in the UTC time format?

Igor Sysoev igor at sysoev.ru
Tue Dec 1 10:18:54 MSK 2009


On Tue, Dec 01, 2009 at 12:52:24AM +0300, Maxim Dounin wrote:

> Hello!
> 
> On Mon, Nov 30, 2009 at 04:31:20PM -0500, naltimari wrote:
> 
> > I need my logs in UTC time format, but nginx by default uses the local time format (I guess in GMT format).
> > 
> > Can it be done? How?
> 
> There is no "UTC time format".  If you mean time zone - just set 
> appropriate one in environment while starting nginx (via TZ 
> environment variable).

BTW, TZ can be set in nginx.conf at global level:

env  TZ=UTC;


-- 
Igor Sysoev
http://sysoev.ru/en/




More information about the nginx mailing list