How does nginx get the TimeZone of local system while compile & install?
Maxim Dounin
mdounin at mdounin.ru
Tue Aug 30 12:14:51 UTC 2011
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
More information about the nginx
mailing list