Automatic Time Synchronisation for D-Link ShareCenter DNS-320

If the current date/time for the D-Link ShareCenter DNS-320 gets reset everytime the the NAS shuts down, a script can be used to perform date/time synchronisation on boot-up. (This requires Fonz fun_plug to be installed.)

Create the file /ffp/start/ with the following content.


# PROVIDE: timesync
# REQUIRE: inetd

. /ffp/etc/ffp.subr


    date +%s -s @`wget -O - -q`;

run_rc_command "$1"


The key to the script lies in the following line.

date +%s -s @`wget -O - -q`;

It can be broken down as follows.

This is a web service that returns the current UNIX timestamp in plain text. (I.e. the HTTP response body contains nothing but the ten-digit current UNIX timestamp.)

wget -O - -q

This wget command makes a request to the specified URL and outputs the HTTP response body (in this case, the ten-digit current UNIX timestamp).

date +%s -s @`wget -O - -q`

This date command sets the current date/time to the specified UNIX timestamp which, in this case, is the response from

This script would run once when the NAS boots up, and hence, the date/time would be synchronised.

Note: wget had to be used to obtain the current date/time because ntpd did not appear to be present.

Note: Though the DNS-320 administrator console allowed an NTP server to be configured, the NAS did not appear to synchronise the time with the server. (Perhaps because ntpd was not present.)




Leave a Comment

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s