rockbox/utils/time-sync
Dominik Riebeling 9574b30066 time-sync: allow passing an arbitrary time.
During testing it can be useful to set an arbitrary (non-current) time on the
device. Extend time-sync to accept an additional (optional) parameter with the
time to set. Only changes date / time, no timezone.

Change-Id: Ib320777cb245cff19ca00b20540db3a43a4e488f
2013-06-09 19:51:08 +02:00
..
Makefile Wrong file name in time-sync utility makefile 2010-04-20 16:39:45 +00:00
README Import ipod-time-sync from libgpod 2010-01-21 11:57:01 +00:00
ipod-scsi.c Import ipod-time-sync from libgpod 2010-01-21 11:57:01 +00:00
time-sync.c time-sync: allow passing an arbitrary time. 2013-06-09 19:51:08 +02:00

README

time-sync is a utility to sync the time with any Rockbox target that runs the
software USB stack.

It was originally take from libgpod and stripped of unnecessary code.

http://gtkpod.git.sourceforge.net/git/gitweb.cgi?p=gtkpod/libgpod

To compile and install, just run:
    make
    make install

Example run:
    mcuelenaere@wim2160:~/rockbox/utils/time-sync$ sudo time-sync /dev/sdb1
	Data Payload: 07 da 00 14 04 0c 30 2b 00 00 00 00
	Write buffer cmd: 3b 01 00 0c 00 00 00 00 0c 00
    Time was synced!

Example udev rule (for Onda VX747):
    # automatically adjust my Rockboxed DAP RTC
    ACTION=="add", ATTRS{idVendor}=="07c4", ATTRS{idProduct}=="a4a5", KERNEL=="sd?", NAME="%k", RUN+="/usr/local/bin/time-sync /dev/%k"