ProFTPDでGMTオフにしたい
前までは特に問題なくTimesGMT FALSEでローカルになっていたのだが気づいたときにはGMTに・・・
気になってソースを見てみたら下記の通り
素直にproftpd.confにこれを入れることにした次第.
SetEnv TZ JST-9
proftpdだけchrootしている訳だから各ユーザのディレクトリにlocaltimeを置くのもシャクだしね.
struct tm *pr_localtime(pool *p, const time_t *t) { struct tm *sys_tm, *dup_tm; #ifdef HAVE_TZNAME char *tzname_dup[2]; /* The localtime(3) function has a nasty habit of changing the tzname * global variable as a side-effect. This can cause problems, as when * the process has become chrooted, and localtime(3) sets/changes * tzname wrong. (For more information on the tzname global variable, * see the tzset(3) man page.) * * The best way to deal with this issue (which is especially prominent * on systems running glibc-2.3 or later, which is particularly ill-behaved * in a chrooted environment, as it assumes the ability to find system * timezone files at paths which are no longer valid within the chroot) * is to set the TZ environment variable explicitly, before starting * proftpd. You can also use the SetEnv configuration directive within * the proftpd.conf to set the TZ environment variable, e.g.: * * SetEnv TZ PST * * To try to help sites which fail to do this, the tzname global variable * will be copied prior to the localtime(3) call, and the copy restored * after the call. (Note that calling the ctime(3) and mktime(3) * functions also causes a similar overwriting/setting of the tzname * environment variable.) * * This hack is also used in the lib/pr-syslog.c code, to work around * mktime(3) antics. */ memcpy(&tzname_dup, tzname, sizeof(tzname_dup)); #endif /* HAVE_TZNAME */