|
From: | анонимный |
Subject: | [Octave-bug-tracker] [bug #58428] mktime incorrect behavior: bug or feature? |
Date: | Fri, 22 May 2020 07:32:25 -0400 (EDT) |
User-agent: | Mozilla/5.0 (X11; Linux x86_64; rv:76.0) Gecko/20100101 Firefox/76.0 |
URL: <https://savannah.gnu.org/bugs/?58428> Summary: mktime incorrect behavior: bug or feature? Project: GNU Octave Submitted by: None Submitted on: Пт 22 май 2020 11:32:23 Category: Octave Function Severity: 3 - Normal Priority: 5 - Normal Item Group: Incorrect Result Status: None Assigned to: None Originator Name: Andrei Demekhov Originator Email: address@hidden Open/Closed: Open Release: 5.1.0 Discussion Lock: Any Operating System: GNU/Linux _______________________________________________________ Details: The following transcript illustrates improper behavior of mktime. octave> tm = gmtime(time()) ### the answer is correct! tm = scalar structure containing the fields: usec = 117882 sec = 53 min = 25 hour = 11 mday = 22 mon = 4 year = 120 wday = 5 yday = 142 isdst = 0 gmtoff = 0 zone = GMT octave> gmtime(mktime(tm)) ## now the time has changed?? ans = scalar structure containing the fields: usec = 117882 sec = 53 min = 25 hour = 8 mday = 22 mon = 4 year = 120 wday = 5 yday = 142 isdst = 0 gmtoff = 0 zone = GMT octave> localtime(mktime(tm)) ### And this is also incorrect!!! ans = scalar structure containing the fields: usec = 117882 sec = 53 min = 25 hour = 11 mday = 22 mon = 4 year = 120 wday = 5 yday = 142 isdst = 0 gmtoff = 10800 zone = MSK octave> _______________________________________________________ Reply to this item at: <https://savannah.gnu.org/bugs/?58428> _______________________________________________ Сообщение отправлено по Savannah https://savannah.gnu.org/
[Prev in Thread] | Current Thread | [Next in Thread] |