On Fri, Jul 11, 2014 at 09:59:36AM +0400, Antony Pavlov wrote: > On Thu, 10 Jul 2014 23:45:47 +0200 > Sascha Hauer <s.hauer@xxxxxxxxxxxxxx> wrote: > > > > +BAREBOX_CMD_START(hwclock) > > > + .cmd = do_hwclock, > > > + BAREBOX_CMD_DESC("query or set the hardware clock (RTC)") > > > > This initial version doesn't allow to set the time. > > I have no idea about simple and elegant solution for setting clock :( > > My hwclock man page show me an example: > > hwclock --set --date="2011-08-14 16:45:05" > > I'll try to find some ready-to-use strptime-like function (e.g. in uClibc). The format which the date man page describes as "coordinated universal time" seems quite easy to parse. It's [MMDDhhmm[[CC]YY][.ss]], so 071107572014 for now. > > Also there is no epoch handling. > > May be it's better to drop hwclock clock setting in the inital rtc support series? I think we should have set time support from the beginning. I mean setting the time is an important part of testing the drivers before merging them. Sascha -- Pengutronix e.K. | | Industrial Linux Solutions | http://www.pengutronix.de/ | Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0 | Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 | _______________________________________________ barebox mailing list barebox@xxxxxxxxxxxxxxxxxxx http://lists.infradead.org/mailman/listinfo/barebox