How to set automatic time in our private WIFI network on MarshMallow The most of  TCP And UDP output port are  closed in our WIFI network. The only way is for synchronize time of my android 6 in AndroidBox TV device is to be connected to our NTP time server. I tried ClocSync, NTPSync or Smart Times Sync with root access no issues.
All of these application are connecting well on the NTP server and showing the NTP time, but they didn't change the system time of the android device in my case. I noted I don't have any /system/etc/gps.conf in my system too
Google play is impacted by this problem and I can not to be connect with it if the time is no good.

Thank for any help
Requirements

1.Root access

2.Busybox : for 'rdate' service

3.init.d folder in /system/etc/ to start daemon service at boot

mount system partition in read write :

su -
mount -o remount,rw /system


Create a file 99my_daemon at /system/etc/init.d with executable permission and enter the following lines

#!/system/bin/sh
while ! ping -c1 "0.pool.ntp.org" &amp;&gt;/dev/null
do wait 10
done
/system/xbin/busybox rdate -s 0.pool.ntp.org
exit 0


Close writing the /system partition

mount -o remount,rw /system


And reboot, your system should be connected to the 0.pool.ntp.org and synchronized when he booted. You could use the crontab to check synchronization during the using of the device