On Wed, 2010-11-03 at 09:10 -0700, Danek Duvall wrote:
> John Levon wrote:
> > As a datapoint, dlstat takes -e (and that was planned for zonestat too).
>
> Though that's an end time; -s <time> is also used in dlstat, and both
> arguments are used to specify a range, rather than a point in time. I'm
> happy if that's what Tim wants to do, but so far, he seems to be trying to
> specify a point.
I'm actually trying to have my cake & eat it :-)
At the moment, -e reads a comma-separated list of dates or date ranges.
So we could specify multiple discreet events, or ranges of events, or
both.
pkg history -e 2010-10-20T14:18:17,2010-11-02T10:20:00-now
I think it'd be hard to do that with -s,-e as dlstat does it, though
perhaps wanting to specify multiple ranges is overkill (it does allow
for "show me pkg events that happened yesterday and today, between 12:00
and 15:00" so long as you know yesterday's and today's dates)
> My question for Tim is whether I can ask for events using some subset of
> the time specification -- if I ask for HH:MM, will I get all events that
> took place (or at least started) during that hour and minute, or is it a
> parsing error?
That's currently a parsing error.
t...@linn[5385] pkg history -e 21:45
Invalid time format '21:45'. Please use %Y-%m-%dT%H:%M:%S or
%Y-%m-%dT%H:%M:%S-%Y-%m-%dT%H:%M:%S
Always going for fully specified dates means we can copy/paste start
times from normal pkg history output, and (the intent was) kept the UI
consistent, so users wouldn't have to wonder what date format we
accepted without reading the man page, and the error message above tries
to help too.
I can go back to the drawing board if you think this would be a useful
addition, or you think overloading -e to take both discreet events and
ranges of events is bad? (I quite like it, I have to admit)
cheers,
tim
_______________________________________________
pkg-discuss mailing list
[email protected]
http://mail.opensolaris.org/mailman/listinfo/pkg-discuss