From owner-freebsd-stable Thu Oct 17 20:17:20 2002 Delivered-To: freebsd-stable@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id BA78D37B401 for ; Thu, 17 Oct 2002 20:17:18 -0700 (PDT) Received: from ntmk.tagil.ru (ntmk.tagil.ru [195.151.0.193]) by mx1.FreeBSD.org (Postfix) with ESMTP id E9B6A43E3B for ; Thu, 17 Oct 2002 20:17:16 -0700 (PDT) (envelope-from boris@ntmk.ru) Received: from ntmk.ru (boris.nikom.ru [10.1.16.195]) by ntmk.tagil.ru (8.9.3/8.9.1) with ESMTP id JAA66726 for ; Fri, 18 Oct 2002 09:17:14 +0600 (YEKST) Message-ID: <3DAF7D3A.7060603@ntmk.ru> Date: Fri, 18 Oct 2002 09:17:14 +0600 From: Boris Kovalenko User-Agent: Mozilla/5.0 (OS/2; U; Warp 4.5; en-US; rv:1.2a) Gecko/20020912 X-Accept-Language: ru, en-us, en MIME-Version: 1.0 To: freebsd-stable@freebsd.org Subject: mktime problem? Content-Type: text/plain; charset=KOI8-R; format=flowed Content-Transfer-Encoding: 7bit Sender: owner-freebsd-stable@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG Hello! First the simple source code: #include #include int main(int argc, char **argv) { time_t today = time( NULL ); struct tm temp = *localtime( &today ); temp.tm_hour = 24; temp.tm_min = 0; temp.tm_sec = 0; temp.tm_mday = 27; today = mktime( &temp ); printf("%s\n", ctime( &today )); return 0; } I expect 28 Oct 00:00, but got 27 Oct 23:00. Why? Daylight saving should be at 28 Oct 02:00? My zoneinfo is Yekaterinburg. -- Good Luck, Boris [Team OS/2] To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-stable" in the body of the message