[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH] New command checktime
From: |
Bean |
Subject: |
Re: [PATCH] New command checktime |
Date: |
Sat, 9 Aug 2008 12:34:57 +0800 |
On Fri, Aug 8, 2008 at 3:12 AM, Robert Millan <address@hidden> wrote:
> On Thu, Aug 07, 2008 at 11:17:14AM -0700, Colin D Bennett wrote:
>> I just have a couple of suggestions:
>>
>> On Fri, 8 Aug 2008 01:52:07 +0800
>> Bean <address@hidden> wrote:
>>
>> > On Thu, Aug 7, 2008 at 7:19 PM, Bean <address@hidden> wrote:
>> > 1. date [MMDDhhmm[[CC]YY][.ss]]
>> >
>> > Set/Display current datetime, to set date, The format is the same as
>> > the date command, you can also use - or : to seperate the numbers. For
>> > example:
>> >
>> > date 0902
>> > Sep, 2.
>> >
>> > date 10-05-13-15
>> > Oct 5, 13:15
>>
>> I know the reason for using that format is to be compatible with the
>> Unix 'date' command, but I find it impossible to remember the arcane
>> format it accepts.
>
> We could have its --help include this "[MMDDhhmm[[CC]YY][.ss]]" boilerplate,
> like with gnu date.
>
> IMHO it's an advantage that the input for changing the date is defined
> simple instead of accepting lots of different layouts. This means less code
> size, less complexity and also makes the commands more usable in scripts and
> such.
>
I agree with Colin the datetime representation should be more
intuitive, but we should stick to one layout. I use the following
format now:
date [[year-]month-day] [hour:minute[:second]]
date is separated by `-' , and time `:', year and second part can be omitted.
>> > 2. crontab min hour day_of_month month day_of_week
>>
>> This really doesn't allow you to edit a crontab, does it? If not, is
>> there a more appropriate name we could use instead of 'crontab'?
>> Perhaps 'testdate' or something?
>
> I think it's good that it mentions crontab, since it basicaly works with
> that format, but I agree that it isn't consistent with the crontab command.
>
> How about something that contains 'crontab' but isn't 'crontab'? Like
> 'test_crontab', 'crontab_check' or something like this?
test_crontab looks good to me.
This is the new patch, if no one objects, I'd commit it soon.
2008-08-09 Bean <address@hidden>
* conf/i386-pc.rmk (pkglib_MODULES): Add datetime.mod, date.mod
and crontab.mod.
(datetime_mod_SOURCES): New macro.
(datetime_mod_CFLAGS): Likewise.
(datetime_mod_LDFLAGS): Likewise.
(date_mod_SOURCES): Likewise.
(date_mod_CFLAGS): Likewise.
(date_mod_LDFLAGS): Likewise.
(crontab_mod_SOURCES): Likewise.
(crontab_mod_CFLAGS): Likewise.
(crontab_mod_LDFLAGS): Likewise.
* conf/i386-coreboot.rmk (pkglib_MODULES): Add datetime.mod, date.mod
and crontab.mod.
(datetime_mod_SOURCES): New macro.
(datetime_mod_CFLAGS): Likewise.
(datetime_mod_LDFLAGS): Likewise.
(date_mod_SOURCES): Likewise.
(date_mod_CFLAGS): Likewise.
(date_mod_LDFLAGS): Likewise.
(crontab_mod_SOURCES): Likewise.
(crontab_mod_CFLAGS): Likewise.
(crontab_mod_LDFLAGS): Likewise.
* conf/i386-ieee1275.rmk (pkglib_MODULES): Add datetime.mod, date.mod
and crontab.mod.
(datetime_mod_SOURCES): New macro.
(datetime_mod_CFLAGS): Likewise.
(datetime_mod_LDFLAGS): Likewise.
(date_mod_SOURCES): Likewise.
(date_mod_CFLAGS): Likewise.
(date_mod_LDFLAGS): Likewise.
(crontab_mod_SOURCES): Likewise.
(crontab_mod_CFLAGS): Likewise.
(crontab_mod_LDFLAGS): Likewise.
* conf/i386-efi.rmk (pkglib_MODULES): Add datetime.mod, date.mod
and crontab.mod.
(datetime_mod_SOURCES): New macro.
(datetime_mod_CFLAGS): Likewise.
(datetime_mod_LDFLAGS): Likewise.
(date_mod_SOURCES): Likewise.
(date_mod_CFLAGS): Likewise.
(date_mod_LDFLAGS): Likewise.
(crontab_mod_SOURCES): Likewise.
(crontab_mod_CFLAGS): Likewise.
(crontab_mod_LDFLAGS): Likewise.
* conf/x86_64-efi.rmk (pkglib_MODULES): Add datetime.mod, date.mod
and crontab.mod.
(datetime_mod_SOURCES): New macro.
(datetime_mod_CFLAGS): Likewise.
(datetime_mod_LDFLAGS): Likewise.
(date_mod_SOURCES): Likewise.
(date_mod_CFLAGS): Likewise.
(date_mod_LDFLAGS): Likewise.
(crontab_mod_SOURCES): Likewise.
(crontab_mod_CFLAGS): Likewise.
(crontab_mod_LDFLAGS): Likewise.
* commands/date.c: New file.
* commands/crontab.c: Likewise.
* include/grub/datetime.h: Likewise.
* include/grub/i386/cmos.h: Likewise.
* kern/generic/get_dow.c: Likewise.
* kern/i386/datetime.c: Likewise.
* kern/efi/datetime.c: Likewise.
--
Bean
date_2.diff
Description: Text Data
- [PATCH] New command checktime, Bean, 2008/08/06
- Re: [PATCH] New command checktime, Robert Millan, 2008/08/06
- Re: [PATCH] New command checktime, Bean, 2008/08/06
- Re: [PATCH] New command checktime, Robert Millan, 2008/08/06
- Re: [PATCH] New command checktime, Bean, 2008/08/07
- Re: [PATCH] New command checktime, Robert Millan, 2008/08/07
- Re: [PATCH] New command checktime, Bean, 2008/08/07
- Re: [PATCH] New command checktime, Bean, 2008/08/07
- Re: [PATCH] New command checktime, Colin D Bennett, 2008/08/07
- Re: [PATCH] New command checktime, Robert Millan, 2008/08/07
- Re: [PATCH] New command checktime,
Bean <=
- Re: [PATCH] New command checktime, Isaac Dupree, 2008/08/09
- Re: [PATCH] New command checktime, Bean, 2008/08/09
- Re: [PATCH] New command checktime, Robert Millan, 2008/08/10
- Re: [PATCH] New command checktime, Bean, 2008/08/10
- Re: [PATCH] New command checktime, Isaac Dupree, 2008/08/10
- Re: [PATCH] New command checktime, Robert Millan, 2008/08/10
- Re: [PATCH] New command checktime, Robert Millan, 2008/08/07
Re: [PATCH] New command checktime, Marco Gerards, 2008/08/10