[prev in list] [next in list] [prev in thread] [next in thread] 

List:       busybox
Subject:    Re: [PATCH] [RFC] parse_date: support another date input format
From:       Alexander Shishkin <virtuoso () slind ! org>
Date:       2010-03-22 18:07:59
Message-ID: 20100322180759.GA30660 () shisha ! kicks-ass ! net
[Download RAW message or body]

On Man, Mar 22, 2010 at 06:25:49 +0100, Denys Vlasenko wrote:
> On Mon, Mar 22, 2010 at 3:09 PM, Alexander Shishkin <virtuoso@slind.org> wrote:
> > + š š š š š š š } else
> > + š š š š š š š /* month_name d HH:MM:SS
> 
> YYYY
> 
> > + š š š š š š š š* this is supported by the GNU make */
> 
> perhaps GNU *date*?

See, I wasn't joking about monday.

> 
> > + š š š š š š š if (isalpha(date_str[0])) {
> 
> Why do you want to check that? in some locales it may fail...

First thing that came to mind.

> 
> > + š š š š š š š š š š š char *res = strptime(date_str, "%b %d %T %Y", ptm);
> > + š š š š š š š š š š š if (!res || *res)
> > + š š š š š š š š š š š š š š š bb_error_msg_and_die(bb_msg_invalid_date, date_str);
> > š//TODO: coreutils 6.9 also accepts "yyyy-mm-dd HH" (no minutes)
> 
> ...and here you fall through to code which tries to parse seconds,
> which is wrong.
> 
> > š š š š š š š š} else {
> > š š š š š š š š š š š šbb_error_msg_and_die(bb_msg_invalid_date, date_str);
> 
> 
> 
> Applied with some changes. Thanks!

Thanks for corrections!

Regards,
--
Alex
_______________________________________________
busybox mailing list
busybox@busybox.net
http://lists.busybox.net/mailman/listinfo/busybox

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic