From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: Shiva Gowda Newsgroups: gmane.os.tru64.managers Subject: mktime() question Date: Tue, 23 Jul 2002 11:17:43 +0200 Organization: ORGA Kartensysteme GmbH Sender: tru64-unix-managers-owner@ornl.gov Message-ID: <3D3D1F37.2000908@orga.com> NNTP-Posting-Host: localhost.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-Trace: main.gmane.org 1027417152 11654 127.0.0.1 (23 Jul 2002 09:39:12 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Tue, 23 Jul 2002 09:39:12 +0000 (UTC) Return-path: Original-Received: from sws1.ctd.ornl.gov ([160.91.20.101]) by main.gmane.org with smtp (Exim 3.33 #1 (Debian)) id 17Ww8L-00031o-00 for ; Tue, 23 Jul 2002 11:39:09 +0200 Original-Received: (qmail 29306 invoked by uid 5); 23 Jul 2002 09:19:18 -0000 Original-Followup-To: poster Precedence: bulk Original-Received: (qmail 29298 invoked from network); 23 Jul 2002 09:19:18 -0000 Original-Received: from unknown (HELO emroute1.cind.ornl.gov) (134.167.3.119) by 0 with SMTP; 23 Jul 2002 09:19:18 -0000 Original-Received: from emroute1.cind.ornl.gov (localhost [127.0.0.1]) by emroute1.cind.ornl.gov (PMDF V6.1-1 #39060) with ESMTP id <0GZP00923385IR@emroute1.cind.ornl.gov> for tru64-unix-managers@sws1.ctd.ornl.gov (ORCPT tru64-unix-managers@ornl.gov) ; Tue, 23 Jul 2002 05:19:17 -0400 (EDT) Original-Received: from relay1.orga.com (relay1.orga.com [194.122.136.34]) by emroute1.cind.ornl.gov (PMDF V6.1-1 #39060) with ESMTP id <0GZP008I637Z05@emroute1.cind.ornl.gov> for tru64-unix-managers@sws1.ctd.ornl.gov (ORCPT tru64-unix-managers@ornl.gov) ; Tue, 23 Jul 2002 05:19:13 -0400 (EDT) Original-Received: from relay3.orga.com (root@relay3.orga.com [192.168.134.42]) by relay1.orga.com (8.9.3/8.9.3) with ESMTP id LAA27201 for ; Tue, 23 Jul 2002 11:18:59 +0200 Original-Received: from pbcom1.orga.com (pbcom1.orga.com [192.168.134.72]) by relay3.orga.com (8.9.3/8.9.3) with ESMTP id LAA29038 for ; Tue, 23 Jul 2002 11:18:59 +0200 Original-Received: from orga.com ([192.168.132.97]) by pbcom1.orga.com (Lotus Domino Release 5.0.2c (Intl)) with ESMTP id 2002072311185902:1011 ; Tue, 23 Jul 2002 11:18:59 +0200 Original-To: tru64-unix-managers@ornl.gov X-Accept-Language: en-us X-MIMETrack: Itemize by SMTP Server on PBCOM1/Paderborn/ORGA(Release 5.0.2c (Intl)|2 February 2000) at 07/23/2002 11:18:59 AM, Serialize by Router on PBCOM1/Paderborn/ORGA(Release 5.0.2c (Intl)|2 February 2000) at 07/23/2002 11:18:59 AM, Serialize complete at 07/23/2002 11:18:59 AM User-Agent: Mozilla/5.0 (Windows; U; Win98; en-US; rv:0.9.4.1) Gecko/20020508 Netscape6/6.2.3 Xref: main.gmane.org gmane.os.tru64.managers:1055 X-Report-Spam: http://spam.gmane.org/gmane.os.tru64.managers:1055 Hi Gurus, Recently we migrated one of our application from 4.0F to 5.1A. From then onwards we have some problems with the application. That is because of mktime() library function. The values returned by this function is not the same. Is there any change in the functionality of mktime()? The timezones are different on both the systems. One is in DST & the other in CEST. Both are UTC+02. Does it affect the mktime() function? thx, //Shiva Here is an example: sgowda@od-dec-unix-7<113> cat time.c #include #include main() { struct tm t; sscanf("19990716112330", "%04d%02d%02d%02d%02d%02d", &(t.tm_year), &(t.tm_mon), &(t.tm_mday), &(t.tm_hour), &(t.tm_min), &(t.tm_sec)); t.tm_year -= 1900; t.tm_mon--; printf("time in time_t: %d\n", mktime(&t)); } sgowda@od-dec-unix-7<107> sizer -v Digital UNIX V4.0F (Rev. 1229); Sun Jan 13 16:29:23 MET 2002 sgowda@od-dec-unix-7<108> ./time time in time_t: 932120610 #<<<<<< Note the value sgowda@od-dec-unix-7<109> sgowda@ds10l-51A<83> sizer -v Compaq Tru64 UNIX V5.1A (Rev. 1885); Tue Feb 5 13:03:20 CET 2002 sgowda@ds10l-51A<84> ~/time time in time_t: 932117010 #<<<<< Its different from above output. sgowda@ds10l-51A<85>