change network time protocol

by default, a mac syncs its time and date with time.apple.com (located system prefs->Date&Time). Is there a way in unix to change it to another address?

my attempts to use ntpdate and ntpd have failed.

What is the error that you've received ?
Example - I use this command :

/usr/sbin/ntpdate 209.81.9.7 > /dev/null 2>&1

to set the time via ntpdate. Otherwise you may use the global server : ntp.pool.org

this is what i get

ComputerName ~ $ sudo ntpdate timeserver.something.com
Password:
 2 Mar 12:02:13 ntpdate[8910]: the NTP socket is in use, exiting
ComputerName ~ $

so then i kill running process "ntpd"

[Computer Name] ~ $ sudo kill 167
Password:
[Computer Name] ~ $ sudo ntpdate timeserver.somthing.com
 2 Mar 12:17:52 ntpdate[9018]: no server suitable for synchronization found
[Computer Name] ~ $ sudo ntpdate time.apple.com
 2 Mar 12:17:32 ntpdate[9010]: no server suitable for synchronization found

Have you tried editing (or creating) an /etc/ntp.conf file?

contents of that file should look something like this:

server time.someserver.com minpoll 12 maxpoll 17

There are of course lots of things you can specify in that file, but the string above should work if it's a valid time server.

For more info, Google ntp.conf

Also, ntpdate sets the date under two conditions. Greater than 5 seconds, or less than 5 seconds. What it does in either case is spelled out in the man page for ntpdate.
The man page also seems to imply you can specify a time server on the command line as an option only if ntpdate can find a reference to "a" time server that ntpd uses in netinfo.
Seems sorta silly...

Anyway, use the ntp.conf file and ntpd for most time syncing. It works pretty well.

thanks man, making my own ntp.conf file works great. I tried using ntpdate, but just couldn't get it to work right