From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.org/gmane.linux.lib.musl.general/5236 Path: news.gmane.org!not-for-mail From: bfdamkoehler Newsgroups: gmane.linux.lib.musl.general Subject: Re: REG_STARTEND (regex) Date: Wed, 11 Jun 2014 21:00:00 -0400 Message-ID: <5398FB90.7000109@sbcglobal.net> References: <20130115134244.GW20323@brightrain.aerifal.cx> Reply-To: musl@lists.openwall.com NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1402534824 22823 80.91.229.3 (12 Jun 2014 01:00:24 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 12 Jun 2014 01:00:24 +0000 (UTC) To: musl@lists.openwall.com Original-X-From: musl-return-5241-gllmg-musl=m.gmane.org@lists.openwall.com Thu Jun 12 03:00:17 2014 Return-path: Envelope-to: gllmg-musl@plane.gmane.org Original-Received: from mother.openwall.net ([195.42.179.200]) by plane.gmane.org with smtp (Exim 4.69) (envelope-from ) id 1WutNI-0007xs-Ts for gllmg-musl@plane.gmane.org; Thu, 12 Jun 2014 03:00:17 +0200 Original-Received: (qmail 30230 invoked by uid 550); 12 Jun 2014 01:00:14 -0000 Mailing-List: contact musl-help@lists.openwall.com; run by ezmlm Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: Original-Received: (qmail 30222 invoked from network); 12 Jun 2014 01:00:13 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sbcglobal.net; s=s1024; t=1402534801; bh=SGRtbZJAM2rIxL+LDlSvHzyiuU38H+QuY7qOUdl6Lcg=; h=X-Yahoo-Newman-Id:X-Yahoo-Newman-Property:X-YMail-OSG:X-Yahoo-SMTP:X-Rocket-Received:Message-ID:Date:From:User-Agent:MIME-Version:To:Subject:References:In-Reply-To:Content-Type:Content-Transfer-Encoding; b=EC4zSk0NPPLm5LtDXgeOVuw9PrQvffX3Xvkv68waXTrMf//9Pnq8+ha0YjtpPgSW7KOHrdlPJ3Ga3RrIeKHwCuvillIMu6h94u+/8CRwc37832PXMlUg9cecvPxyw8Dxpmb5YX0wwG3fK9hT+LXpZ4ty8PEIzC743F0zkcPC6S8= X-Yahoo-Newman-Id: 465674.51958.bm@smtp115.sbc.mail.bf1.yahoo.com X-Yahoo-Newman-Property: ymail-3 X-YMail-OSG: nBFRrI0VM1mAX2jsT7okSdASKGBRR_K1g2Qa6z.JmkwWnaC tHco3eUvqAUKnuICJsu48SQl3dD7j1WmhM1wj_BhoG83W3uAYcUHOOGEcMlv g8tsJWpLg8biiBQzGNWswnUaQqxwBQXPX9NPAgDCU4KkSolLyQ48o6vO6PUj 541j7vEmtI2naAauebwQf4vjIo5BKVH.FZOmG.Mm7LGrjusF3BZj_XMjtCZX 635JFXOQMfu5PLQGjZm4ghu.OnFD9QPH9e7CmZvWfbVE6CM_7IVQB8N.n6j6 WvpBPslJ8TQzLC6Iv2ueL0Dnq6OKTjK9XubT4Ys6OPXWs7ty3w6t.Mem_gxw I3tvKqp3hwjBWUG9vvPlk98b0AJtVcDCkJT91tZXD.ia75vGUdu_dGgzCYF5 4FuoLp0cB5Lhp5SGilr275ccB.Acu8qmM2EoFKn65ie5brQagkdzPTRnCE3k _lx0SsLF1.x27OASUVPPgp3WiCHqhs4QIctuDfl4YsLH93lfTY21X2GSdkEX aqPGq41tJpvrWkbiCMvWBbqJVE5bLuFC9Rp9KZjah.JAWsR2RSas- X-Yahoo-SMTP: Np3RzY2swBAB_oRrWub8XEpFIh_m1T4CPAAeBAl1liESQFmqrZM3 X-Rocket-Received: from bfd-lt4.nodomain.nowhere (bfdamkoehler@99.129.244.79 with plain [98.139.221.42]) by smtp115.sbc.mail.bf1.yahoo.com with SMTP; 11 Jun 2014 18:00:01 -0700 PDT User-Agent: Mozilla/5.0 (X11; Linux i686; rv:17.0) Gecko/20131030 Thunderbird/17.0.10 In-Reply-To: Xref: news.gmane.org gmane.linux.lib.musl.general:5236 Archived-At: Hello, I noticed an issue with localtime() in musl-1.1.2. In my environment TZ is set to EST5EDT. There is a test program below that demonstrates this. localtime() is returning with isdst == 1 for for a time_t value of 1394327858 (08-Mar-14 20:17). Daylight savings time starts on 09-Mar-14. Note that if you decrement the time_t value in the test program isdst remains set. This time_t value is the st_atime value of a file on my machine, as returned by stat64(). Just as further test I moved the file around to an AIX 5.2 machine, HPUX 11.11, and OpenBSD 5.0 system and a Centos 6.5 linux machine. I used ls and tar on them to display the file date and they all came out as 08-Mar-14 20:17, as does the output from my application if it is linked with the gcc libc. When my application is linked with musl it produces a time of 08-Mar-14 21:17. I just wanted to mention that I had noticed this. Bruce #include #include #include #include int main() { time_t bin_time = 1394327858; /* should be 08-Mar-14 20:17 but */ /* localtime returns isdst=1 so */ /* it is 08-Mar-14 21:17 */ struct tm *tm_ptr; char *cptr; //#define GO_BACK_N_DAYS_IN_TIME #ifdef GO_BACK_N_DAYS_IN_TIME bin_time = 1394327858 - ( (24 * 60 * 60) * 60); #endif cptr = getenv("TZ"); if( cptr == NULL ) printf("the TZ environment variable is not defined\n"); else printf("the TZ environment variable is set to %s\n", cptr); tm_ptr = localtime(&bin_time); printf("The local time is ...\n"); printf("\t\ttm_sec ........... %d\n", tm_ptr->tm_sec); printf("\t\ttm_min ........... %d\n", tm_ptr->tm_min); printf("\t\ttm_hour .......... %d\n", tm_ptr->tm_hour); printf("\t\ttm_mday .......... %d\n", tm_ptr->tm_mday); printf("\t\ttm_mon ........... %d\n", tm_ptr->tm_mon); printf("\t\ttm_year .......... %d\n", tm_ptr->tm_year); printf("\t\ttm_wday .......... %d\n", tm_ptr->tm_wday); printf("\t\ttm_yday .......... %d\n", tm_ptr->tm_yday); printf("\t\ttm_is_dst......... %d\n", tm_ptr->tm_isdst); printf("\n\n"); printf("tm_hour should be 20 and tm_is_dst should be 0 -- DST starts on 09-Mar-14.\n"); printf("\n\n"); }