How can I syncronize android time with machine via ADB How can I update android time via ADB?

I know I can run this comand via windows cmd:

adb shell date -s 20140414.130000


But I need to synchronize the time with my windows machine.

Is this possible to accomplish?
I found a solution for this by using the perl.

I created this perl script, which sends the current date with the correct format to the android device via adb:

use Time::localtime;
$_=localtime;
system'adb','shell','date -s',sprintf("%04d%02d%02d.%02d%02d%02d",$_-&gt;year+1900,$_-&gt;mon+1,$_-&gt;mday,$_-&gt;hour,$_-&gt;min,$_-&gt;sec)


Then I just need to open cmd and run this:

perl &lt; clock.pl