[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Octave-bug-tracker] [bug #36954] datenum converts date string incorrect
From: |
Philip Nienhuis |
Subject: |
[Octave-bug-tracker] [bug #36954] datenum converts date string incorrectly during DST start |
Date: |
Tue, 23 Aug 2016 21:52:23 +0000 (UTC) |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Firefox/45.0 |
Follow-up Comment #11, bug #36954 (project octave):
After some searching on the web I infer that it is implementation-dependent
what strptime will do with "nonexistent" times, here meant to be a time in the
skipped hour when changing to DST.
Apparently the strptime that Octave uses chose to translate such times to DST
and implicitly add an hour.
I wonder how Matlab does it - that is able to convert series date/time strings
around DST switch time, into a continuous and consecutive series of datenums.
Apparently ML does not invoke strptime at all.
I've experimented a bit with strptime() and strftime() but it turns out very
hard to circumvent strptime's behavior and detect if it has fiddled with the
hour, w/o multiple calls to these functions,i.e., there's some performance
penalty.
But maybe that is not such a big deal.
_______________________________________________________
Reply to this item at:
<http://savannah.gnu.org/bugs/?36954>
_______________________________________________
Message sent via/by Savannah
http://savannah.gnu.org/