Sample usage:
Code: Select all
/getsetcurrenttimefromtv -n exeDSP
Current Time: 1393671424
Current TimeZone Number: 9
Current TimeZone Offset: 60
The current date/time is: Sat Mar 1 10:57:04 2014
Current Time+Offset: 1393675024
The current date/time+offset is: Sat Mar 1 11:57:04 2014
Code: Select all
/getsetcurrenttimefromtv -n exeDSP -s
New version. Added D/E support.
EDIT2:
Update. Added TimeZone support.
EDIT3:
New version. The app now also sets the time.
EDIT4:
Update. Added "date mode".
EDIT5:
Update. Added set2 option (forces +offset on C).
EDIT6:
Update. Removed set2 option (now app always adds +offset to current time). Add --utc switch.
EDIT7:
Update. Added "date mode" for correct time zone (-U)
If you want to use getsetcurrenttimefromtv instead of default date command add this line to $SYSROOT/etc/rc.sysinit:
Code: Select all
echo "alias date='getsetcurrenttimefromtv -n exeDSP -D'" >> /dtv/.ashrc
Code: Select all
echo "alias date='getsetcurrenttimefromtv -n exeDSP -U'" >> /dtv/.ashrc
EDIT8:
Added support for additional display formats (-Y,-M,etc.)