On Mon, 10 Mar 2014, Edmond Orignac wrote:

I am replying to my original message to add some precisions.

As I explained in my previous message, dtcm has switched to Daylight
Saving Time (UTC+2) yesterday (as expected for North America) although
in the European Union the switch to Daylight Saving Time is scheduled
for March 30.

The analog clock in the front panel is giving the correct time (UTC+1)
so the problem is related to dtcm.

Problems related to DST in dtcm have been already noticed in Tru64 Unix
in 1996. Here are 2 messages from the mailing list at ORNL.

http://article.gmane.org/gmane.os.tru64.managers/3863
http://article.gmane.org/gmane.os.tru64.managers/3866

dtcm seems to consider that timezones are simply UTC+N with the dates to
switch to/from DST being simply the same as in North America.


If you are using checked out source (or the source tree), could you
apply the attached patch, rebuild, and see if that fixes anything?


--
Jon Trulson

    Last day, Capricorn fifteens. Year of the city, 2274.
    Carousel begins.
diff --git a/cde/lib/csa/iso8601.c b/cde/lib/csa/iso8601.c
index 5599192..1252fba 100644
--- a/cde/lib/csa/iso8601.c
+++ b/cde/lib/csa/iso8601.c
@@ -29,6 +29,10 @@
  */
 
 #include <EUSCompat.h>
+#define XOS_USE_NO_LOCKING
+#define X_INCLUDE_TIME_H
+#include <X11/Xos_r.h>
+
 #include <stdlib.h>
 #include <stdio.h>
 #include <unistd.h>
@@ -42,12 +46,12 @@ set_timezone(char *tzname)
         static char tzenv[BUFSIZ];
  
         if (tzname==NULL)
-               system("unset TZ\n");
+                (void) putenv("TZ");
         else {
                 snprintf(tzenv, sizeof tzenv, "TZ=%s", tzname);
                 (void) putenv(tzenv);
-                tzset();
         }
+        tzset();
 }
 
 static int
@@ -166,12 +170,16 @@ _csa_tick_to_iso8601(time_t tick, char *buf_out)
        time_t          tk=tick;
        char            tz_orig[BUFSIZ];
        boolean_t       orig_tzset = B_FALSE;
+        _Xgtimeparams   gmtime_buf;
 
        /* tick must be +ve to be valid */
        if (tick < 0) {
           return(-1);
        }
 
+       /* JET.  This is horrible. */
+#if !defined(linux) && !defined(CSRG_BASED)
+
        if (getenv("TZ")) {
                strncpy(tz_orig, getenv("TZ"), sizeof(tz_orig));
                tz_orig[sizeof(tz_orig)-1] = '\0';
@@ -191,6 +199,11 @@ _csa_tick_to_iso8601(time_t tick, char *buf_out)
        else
                set_timezone(NULL);
 
+#else 
+       /* let's use something a little more reasonable */
+        time_str = _XGmtime(&tk, gmtime_buf);
+#endif /* !linux && !CSGRC_BASED */
+
        /* format string forces fixed width (zero-padded) fields */
        sprintf(buf_out, "%04d%02d%02dT%02d%02d%02dZ",
                time_str->tm_year + 1900,
------------------------------------------------------------------------------
Learn Graph Databases - Download FREE O'Reilly Book
"Graph Databases" is the definitive new guide to graph databases and their
applications. Written by three acclaimed leaders in the field,
this first edition is now available. Download your free book today!
http://p.sf.net/sfu/13534_NeoTech
_______________________________________________
cdesktopenv-devel mailing list
cdesktopenv-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/cdesktopenv-devel

Reply via email to