Commit Graph

59 Commits

Author SHA1 Message Date
Linus Torvalds
68849b5442 date handling: handle "AM"/"PM" on time
And be a bitmore careful about matching: if we don't recognize a word
or a number, we skip the whole thing, rather than trying the next character
in that word/number.

Finally: since ctime() adds the final '\n', don't add another one in test-date.
2005-05-01 12:34:56 -07:00
Linus Torvalds
198b0fb635 date.c: allow even more varied time formats
(and some added checks for truly non-sensical stuff)
2005-05-01 11:48:34 -07:00
Linus Torvalds
7f26664f1f date.c: fix printout of timezone offsets that aren't exact hours
We'd get the sign wrong for the minutes part of a negative offset.
2005-04-30 16:18:41 -07:00
Linus Torvalds
92e2311b6c date.c: only use the TZ names if we don't have anything better.
Also, add EEST (hey, it's Finland).
2005-04-30 15:21:57 -07:00
Linus Torvalds
5e2a78a410 date.c: split up dst information in the timezone table
This still doesn't actually really _use_ it properly, nor make any
distinction between different DST rules, but at least we could (if
we wanted to) fake it a bit better.

Right now the code actually still says "it's always summer". I'm
from Finland, I don't like winter.
2005-04-30 14:53:12 -07:00
Linus Torvalds
a90588821a date.c: fix parsing of dates in mm/dd/yy format
We looked at the year one character too early, and we
didn't accept a two-character year date after 2000.
2005-04-30 14:31:28 -07:00
Linus Torvalds
eaa8512923 date.c: use the local timezone if none specified 2005-04-30 14:25:02 -07:00
Linus Torvalds
89967023da Make the date parsing accept pretty much any random crap.
This date parser turns line-noise into a date. Cool.
2005-04-30 13:19:56 -07:00
Edgar Toernig
ecee9d9e79 [PATCH] Do date parsing by hand...
...since everything out there is either strange (libc mktime has issues
with timezones) or introduces unnecessary dependencies for people (libcurl).

This goes back to the old date parsing, but moves it out into a file of
its own, and does the "struct tm" to "seconds since epoch" handling by
hand. 

I grepped through the tz-database and it seems there's one "country"
left that has non-60-minute DST: Lord Howe Island.  All others dropped
that before 1970.
2005-04-30 09:46:49 -07:00