[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
strptime() inconsistency
From: |
Ben Abbott |
Subject: |
strptime() inconsistency |
Date: |
Wed, 03 Mar 2010 15:44:08 +0900 |
I've noticed that behavior of strptime() is not consistent for me on MacOS X.
Running the MacOS X binary for 3.2.3 from OctaveForge
fmt = "%d-%b-%Y";
str = "17-Sep-1789";
[tm, nc] = strptime (str, fmt)
tm =
{
usec = 0
sec = 0
min = 0
hour = 0
mday = 17
mon = 8
year = 89
wday = 0
yday = 259
isdst = 0
zone = JST
}
nc = 12
However, the 3.2.3 binary I built using gcc 4.4.2, I obtain the result below.
When I build the current sources using gcc 4.2.1, I also see the result below.
tm =
{
usec = 0
sec = 0
min = 0
hour = 0
mday = 17
mon = 8
year = 0
wday = 0
yday = 0
isdst = 0
zone = unknown
}
nc = 0
This problem only occurs for dates prior to 01-Jan-1900.
Does anyone have an idea what might be the cause of this inconsistent behavior?
Ben
- strptime() inconsistency,
Ben Abbott <=