Hello!
Post by naltimariWell, maybe you're right, but what I need is the same time that would come from 'date -u' command.
Right now, my log time format is like this: 30/Nov/2009:16:14:39 -0200
It's date and time in common log format
(http://en.wikipedia.org/wiki/Common_Log_Format).
Post by naltimariWhen I need this: Mon Nov 30 18:14:39 UTC 2009
Can I change the syntax/format in which the date is written to the log?
No, the is no way to specify arbitrary format for time. The only
available options out-of-the box is $time_local (time in common log
format) and $msec (seconds since the Epoch with milliseconds
resolution).
The only option for now is to use something like embedded perl to
construct time in arbitrary format, something like
perl_set $tt 'sub { scalar localtime }';
and then use it in logs via appropriate log_format. But I don't
really think it's a good way to go.
BTW, could you please explain why do you need time in this particular
format?
Maxim Dounin