[Ecls-list] Datetime bug (gmt?)
Hi! I have some trouble with datetime in ECL. In the terminal: $ date Thu Aug 2 16:12:26 MSK 2012 $ date -u Thu Aug 2 12:12:27 UTC 2012 ECL (last version from ecls-ecl git): (get-decoded-time) = 13, 13, 15, 2, 8, 2012, 3, NIL, -3 ClozureCl: (get-decoded-time) = 50, 13, 16, 2, 8, 2012, 3, NIL, -4 It there a problem with GMT detection? -- Live Security Virtual Conference Exclusive live event will cover all the ways today's security and threat landscape has changed and how IT managers can respond. Discussions will include endpoint security, mobile security and the latest in malware threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ ___ Ecls-list mailing list Ecls-list@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/ecls-list
[Ecls-list] Datetime bug (gmt?)
On Thu, Aug 2, 2012 at 2:17 PM, Stanislav Frolov frolosof...@gmail.comwrote: It there a problem with GMT detection? Could it be rather a problem with summer time? ECL relies on the C library for the timezone and the summer time (see src/c/mislib.lsp) and it seems to work for Spain Mac-de-Juan:~ jjgarcia$ date -u Thu Aug 2 12:54:29 UTC 2012 iMac-de-Juan:~ jjgarcia$ date Thu Aug 2 14:54:32 CEST 2012 iMac-de-Juan:~ jjgarcia$ ecl -norc -eval '(print (multiple-value-list (get-decoded-time)))' -eval '(quit)' (57 54 14 2 8 2012 3 T -1) Juanjo -- Instituto de Física Fundamental, CSIC c/ Serrano, 113b, Madrid 28006 (Spain) http://juanjose.garciaripoll.googlepages.com -- Live Security Virtual Conference Exclusive live event will cover all the ways today's security and threat landscape has changed and how IT managers can respond. Discussions will include endpoint security, mobile security and the latest in malware threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/___ Ecls-list mailing list Ecls-list@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/ecls-list
Re: [Ecls-list] Datetime bug (gmt?)
Could it be rather a problem with summer time? ECL relies on the C library for the timezone and the summer time (see src/c/mislib.lsp) and it seems to work for Spain Maybe. Last year, Russia hasn't summer/winter time transition. I have read the code src/lisp/mislib.lsp and found ECL don't uses tzset/timezone for time zone detection (HAVE_TZSET set to 1). I debug function get-local-time-zone, it return -3 instead of -4. I found in source next code #if 0 defined(HAVE_TZSET) tzset(); mw = timezone/60; #endif Why 0? Simple test code 'tzset(); timezone/60/60'; evaluates in '-4'. So, problem in: struct tm ltm, gtm; time_t when = 0L; ltm = *localtime(when); gtm = *gmtime(when); mw = (gtm.tm_min + 60 * gtm.tm_hour) - (ltm.tm_min + 60 * ltm.tm_hour); if ((gtm.tm_wday + 1) % 7 == ltm.tm_wday) mw -= 24*60; else if (gtm.tm_wday == (ltm.tm_wday + 1) % 7) mw += 24*60; But i don't understand this code :( -- Live Security Virtual Conference Exclusive live event will cover all the ways today's security and threat landscape has changed and how IT managers can respond. Discussions will include endpoint security, mobile security and the latest in malware threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ ___ Ecls-list mailing list Ecls-list@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/ecls-list
[Ecls-list] Problem building ECL on Cygwin
Dear all, A few weeks ago I attempted to build different versions of ECL (10.4, 11.1 and 12.stg) on Cygwin 1.7.15 and now on 1.7.16 and had problems because of the C type fd_set is undefined. On the one hand it indeed seems that recent (or at least the one I got!) versions of Cygwin do not define fd_set (in sys/types.h) when _WINSOCKAPI_ is defined. On the other hand, it seems that ECL unconditionaly defines _WINSOCKAPI_ in ecl-cmp.h. For my purposes with Sage I patched that file not to define _WINSOCKAPI_ when __CYGWIN__ is. See http://trac.sagemath.org/sage_trac/ticket/13324 for further details. I tried to directly submit a bug on sf.net but can not devise how to do that (I created an account and went to the bugs page of the ECL project but there was no obvious button to click on). Best, -- Jean-Pierre Flori -- Live Security Virtual Conference Exclusive live event will cover all the ways today's security and threat landscape has changed and how IT managers can respond. Discussions will include endpoint security, mobile security and the latest in malware threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ ___ Ecls-list mailing list Ecls-list@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/ecls-list
Re: [Ecls-list] Problem building ECL on Cygwin
On Thu, Aug 2, 2012 at 4:33 PM, Jean-Pierre Flori jpfl...@gmail.com wrote: I tried to directly submit a bug on sf.net but can not devise how to do that (I created an account and went to the bugs page of the ECL project but there was no obvious button to click on). If you go to https://sourceforge.net/p/ecls/patches/ log in and click on Create Ticket you can attach your patch for future revision. If you find it too uncomfortable for this one particular submission, just send it to me by email. Juanjo -- Instituto de Física Fundamental, CSIC c/ Serrano, 113b, Madrid 28006 (Spain) http://juanjose.garciaripoll.googlepages.com -- Live Security Virtual Conference Exclusive live event will cover all the ways today's security and threat landscape has changed and how IT managers can respond. Discussions will include endpoint security, mobile security and the latest in malware threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/___ Ecls-list mailing list Ecls-list@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/ecls-list
Re: [Ecls-list] Datetime bug (gmt?)
Bug? Feature? I think its a feature cause administrative time zone can be changed. So In 1970 Moscow timezone was 3 GMT and now ts is 4 GMT. Can we fix mislib's get-local-time-zone? -time_t when = 0L; +time_t when = time(0); It will return current timezone. -- Live Security Virtual Conference Exclusive live event will cover all the ways today's security and threat landscape has changed and how IT managers can respond. Discussions will include endpoint security, mobile security and the latest in malware threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ ___ Ecls-list mailing list Ecls-list@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/ecls-list
Re: [Ecls-list] Datetime bug (gmt?)
Stanislav Frolov frolosof...@gmail.com writes: What is the value of localtime() and gmtime() in your system? localtime(0): tm_sec 0 tm_min 0 tm_hour 3 tm_mday 1 tm_mon 0 tm_year 70 tm_wday 4 tm_yday 0 tm_stdst 0 gmtime(0): tm_sec 0 tm_min 0 tm_hour 0 tm_mday 1 tm_mon 0 tm_year 70 tm_wday 4 tm_yday 0 tm_stdst 0 Looks like localtime returns 3 hours instead of 4. And datetimes for current time_t: localtime(NOW): tm_sec 46 tm_min 15 tm_hour 9 tm_mday 3 tm_mon 7 tm_year 112 tm_wday 5 tm_yday 215 tm_stdst 0 gmtime(NOW): tm_sec 46 tm_min 15 tm_hour 5 tm_mday 3 tm_mon 7 tm_year 112 tm_wday 5 tm_yday 215 tm_stdst 0 Difference between gmtime and localtime is 4 hours. Bug? Feature? Well, the difference between 1 January 1970 GMT and 1 January 1970 MSK is 3 hours. -- With best regards, Stas. -- Live Security Virtual Conference Exclusive live event will cover all the ways today's security and threat landscape has changed and how IT managers can respond. Discussions will include endpoint security, mobile security and the latest in malware threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ ___ Ecls-list mailing list Ecls-list@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/ecls-list