The "accesses in the past day" counter is reset based on the value of "midnight" in the local time zone, which is obtained using the second ('tz') parameter of gettimeofday().

Alas, Solaris "tolerates" the second parameter but does not support it (see "man gettimeofday"), the value returned is whatever is on the stack at the time - which in our installation reliably translates to something around 8 o'clock in the morning (summertime).

The attached patch corrects this using the official Solaris tzset() call. Applicable to both 1.2.x & 1.3.x.

--
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
Rainer Toebbicke
European Laboratory for Particle Physics(CERN) - Geneva, Switzerland
Phone: +41 22 767 8985       Fax: +41 22 767 7155
*** openafs/src/vol/volume.c.orig       2005-04-11 09:41:56.000000000 +0200
--- openafs/src/vol/volume.c    2005-04-11 10:00:25.000000000 +0200
***************
*** 257,264 ****
--- 257,269 ----
      Lock_Init(&vol_listLock);
      Lock_Init(&FSYNC_handler_lock);
      srandom(time(0));         /* For VGetVolumeInfo */
+ #ifdef AFS_SUN5_ENV
+     tzset();
+     TimeZoneCorrection = daylight ? altzone : timezone;
+ #else
      gettimeofday(&tv, &tz);
      TimeZoneCorrection = tz.tz_minuteswest * 60;
+ #endif /* AFS_SUN5_ENV */
  
      if (volcache > VolumeCacheSize)
        VolumeCacheSize = volcache;

Reply via email to