On Fri, 18 Jul 2003, Sam Varshavchik wrote: > Joe Laffey writes: > > > Why does this say GMT -4 in the header below? > > > > The server is set to US/Central and the date command shows that. I > > restarted courier as well. The sending machine (ubermail) is also set to > > US/Central (-5 GMT) > > Generally, all daemons are started with a fresh environment, so if you rely > on a manual TZ setting to get your time zone, it's not going to work. > > Try putting 'opt TZ=CST6CDT' into the bofh file.
I think we have some sort of bug here. I have two courier servers. Both run 0.42. Both run NetBSD 1.6.1. One is PPC, the other x86. in the rfc822 config.h both get configed to #define USE_TIME_DAYLIGHT 1 However, it would appear that locatime already accounts for daylight savings time (even the manpage says so) on these systems. Below is a section of code I copied from rfc822_mkdate.c with slight modifications to make a test: #include <sys/types.h> #include <time.h> #include <stdio.h> #include <string.h> #include <stdlib.h> #include <unistd.h> int main(void) { struct tm *p; int offset; time_t t; t = time(NULL); p=localtime(&t); offset= -(int)timezone; /******* Below is the offensive code *******/ if (p->tm_isdst > 0) offset += 60*60; /*******************************************/ if (offset % 60) { offset=0; p=gmtime(&t); } offset /= 60; offset = (offset % 60) + offset / 60 * 100; printf("offset:%+05d\n", offset); printf("timezone:%d\n", (int)timezone); return 0; } When run this code produces: [10:25pm]host ~> ./a.out offset:-0400 timezone:18000 [10:25pm]host ~> date Sat Jul 19 22:25:43 CDT 2003 [10:25pm]host ~> ls -l /etc/localtime lrwx------ 1 root wheel 30 Jul 18 14:16 /etc/localtime -> /usr/share/zoneinfo/US/Central As evidenced by the date command and the /etc/localtime symlink the server has the timezone and date set correctly. It would appear that courier is for some reason adjusting for daylight savings time when it should not be. Both servers show this same behavior. I would appreciate any additional info. For now I shall just remove what I have labeled the "offensive code" above. Thanks for Courier! It is great! -- Joe Laffey | Want to convert subnet masks between different LAFFEY Computer Imaging | notations, or figure the number of IPs in a block? St. Louis, MO | Whatmask-It's FREE - www.laffeycomputer.com/wm.html ------------------------------------------------------------------------------ ------------------------------------------------------- This SF.net email is sponsored by: VM Ware With VMware you can run multiple operating systems on a single machine. WITHOUT REBOOTING! Mix Linux / Windows / Novell virtual machines at the same time. Free trial click here: http://www.vmware.com/wl/offer/345/0 _______________________________________________ courier-users mailing list [EMAIL PROTECTED] Unsubscribe: https://lists.sourceforge.net/lists/listinfo/courier-users