How does nginx get the TimeZone of local system while compile & install?
Sharl.Jimh.Tsin
amoiz.shine at gmail.com
Tue Aug 30 12:29:56 UTC 2011
在 2011-08-30二的 16:14 +0400,Maxim Dounin写道:
> 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] http://wiki.nginx.org/CoreModule#env
>
> Maxim Dounin
>
> _______________________________________________
> nginx mailing list
> nginx at nginx.org
> http://mailman.nginx.org/mailman/listinfo/nginx
OK,thanks for your quickly reply,Maxim Dounin.
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.
More information about the nginx
mailing list