$OpenBSD: patch-platforms_unix_plugins_LocalePlugin_sqUnixLocale_c,v 1.1 2008/07/23 11:17:22 espie Exp $
--- platforms/unix/plugins/LocalePlugin/sqUnixLocale.c.orig	Wed Jul 23 00:12:01 2008
+++ platforms/unix/plugins/LocalePlugin/sqUnixLocale.c	Wed Jul 23 00:13:24 2008
@@ -672,9 +672,10 @@ sqInt sqLocGetTimezoneOffset(void)
  */
 sqInt sqLocDaylightSavings(void)
 {
-  extern int daylight;
+  struct timezone tz;
+  gettimeofday(0, &tz);
 
-  return !!daylight;
+  return !!tz.tz_dsttime;
 }
 
 /* Answer the number of characters in the long date format.
