date setting

Dav
Hi,

I would like to set the date. I used to set it by date command. It used to
work perfectly under my host pc. But it doesn’t work well on my mini2440. I
can use the simple date command, but I cannot set the date.
So: #date works well but the #date 12:12:12 doesn’t work anyway; the answer
is invalid date ’12:12:12’
What is the problem? How can be it solved?
Any kind of Linux commands would be good to me. I also would be happy to
get any idea to solve the same problem from c as well.

Dav

Juergen Beisert
Did you read the "date --help" output about the date/time format your
'date' implementation wants?

Dav
Hi,

Yes, I did so.
e.g.: hh:mm[:ss] is a possibly format. So I typed: date -s 12:35
I have got “invalid date” message.
(By the way It works on my host pc.)
My Linux is: 
Linux version 2.6.32.2-FriendlyARM (root@russell-work-pc) (gcc version
4.4.3 (ctng-1.6.1) ) #1 Wed Jul 28 14:57:14 CST 2010

Dav

Dav
I have solved the problem

date --help gave a worse type of format, I think

date -s  MMDDhhmmYYYY is the good format.

davef
I found that I needed to put quotes around everything after date -s or date
--set, which is not in the help.

Xristos
Worked for me without any quotes