Check the web for the "ntpd" daemon and/or the "ntpdate" commands. You may also need "hwclock".
As for getting/setting the time remotely, you need some access to the server for that. If you have command-line access, "date" is your friend. If not, create a Tomcat webapp using any of the multiple date/time java classes to achieve this.