hi,ALL
it’s me,i come here again and post my problem here.
last weekend,i uninstalled the old version of nginx (1.0.4),and
installed the newest development version 1.1.1 on my VPS.
but,unfortunately that i found that nginx still used the UTC timezone
not CST locally.
that’s strange.Can someone help me fix the problem? Thanks a lot 
–
Best regards,
Sharl.Jimh.Tsin (From China Obviously Taiwan INCLUDED)
Using Gmail? Please read this important notice:
Gmail — Free Software Foundation — Working together for free software.
Hello!
On Tue, Aug 30, 2011 at 07:53:31PM +0800, Sharl.Jimh.Tsin wrote:
hi,ALL
it’s me,i come here again and post my problem here.
last weekend,i uninstalled the old version of nginx (1.0.4),and
installed the newest development version 1.1.1 on my VPS.
but,unfortunately that i found that nginx still used the UTC timezone
not CST locally.
that’s strange.Can someone help me fix the problem? Thanks a lot 
By default nginx uses timezone as set during startup (either in TZ
environment variable, or system’s default one).
Looks like you just have it set to UTC while starting nginx (only
set CST for your particular user?).
If in doubt how to correctly set timezone on your system, you may
do so explicitly in nginx config via “env” directive (see [1]):
env TZ=CST;
(note that using CST explicitly may not be a good idea, as it
won’t account for daylight saving changes if there are any in your
area, you may want to use something like “TZ=America/Menominee”
instead)
[1] Core functionality
Maxim D.
Hello!
On Tue, Aug 30, 2011 at 08:29:56PM +0800, Sharl.Jimh.Tsin wrote:
[…]
and to define it in nginx.conf file via “env” probably not work at all,i
tried it before.for example “env TZ=Asia/Shanghai”.
Which OS do you use, Linux? This works perfectly on FreeBSD, but
it looks like not on Linux as it doesn’t check updated TZ
environment on localtime_r() calls and requires explicit tzset().
I’ll take a more closer look as time permits.
Maxim D.
在 2011-08-30二的 16:14 +0400,Maxim D.写道:
not CST locally.
do so explicitly in nginx config via “env” directive (see [1]):
Maxim D.
nginx mailing list
[email protected]
nginx Info Page
OK,thanks for your quickly reply,Maxim D…
When i heard that nginx will detect the TimeZone variable at startup,i
am so happy!
Maybe i have set CST timezone for my own user,not ALL users.i will try
to set it to Global later.
and to define it in nginx.conf file via “env” probably not work at all,i
tried it before.for example “env TZ=Asia/Shanghai”.
–
Best regards,
Sharl.Jimh.Tsin (From China Obviously Taiwan INCLUDED)
Using Gmail? Please read this important notice:
http://www.fsf.org/campaigns/jstrap/gmail?10073.
在 2011-08-30二的 19:51 +0400,Maxim D.写道:
it looks like not on Linux as it doesn’t check updated TZ
environment on localtime_r() calls and requires explicit tzset().
I’ll take a more closer look as time permits.
Maxim D.
nginx mailing list
[email protected]
nginx Info Page
Yes,exactly it is CentOS GNU/Linux distro.
and i am so sorry that reply you so later.
–
Best regards,
Sharl.Jimh.Tsin (From China Obviously Taiwan INCLUDED)
Using Gmail? Please read this important notice:
http://www.fsf.org/campaigns/jstrap/gmail?10073.