Open2300 - Set WS 23xx Time From Server

Set Time From Server

Synchronise WS2300 time from the PC clock


For those of us not in reach of DCF (eg me Sydney, Australia) it would be handy to auto adjust for the device clock skew and for Daylight Savings etc..

Description of Patch

Propose to create a new program "sync2300" that will apply server time to the WS23XX device and new functions in rw2300.c This script could run as a cron job replacing the function of the DCF receiver.

Installation of Patch

Against svn revision 12

patch -p0 -i sync2300-00.patch

Change History of Patch

00 - sync2300 set WS2300 time to server local time

Discussion and Comments

Time Zone considerations

Without DCF the timezone offset serves no purpose other than to complicate conversions and in any case the device only supports hourly offsets from UTC, which if you live in South Australia at GMT + 10:30 is going to be a problem.

All the history/max/min times etc in the device seem to reference local time.

The weather updating programs (eg wu2300) use the server (PC) time rather than the device time anyway, as does fetch2300. (in fact rw2300.c has no capability for returning the device time, although the raw data is used in all the max/min reset functions.)

So this patch will set the WS2300 timezone to zero.

Really only makes sense to run this on a machine that is getting internet time updates to maintain correct local time so should not need parameters or config values for timezone offsets.

Well after some more testing, the time setting in this patch works but the date doesn't. If anybody wants this I'll be happy to update the patch.

-- GrantGardner - 01 Mar 2008

I backported sync2300 to version 1.10 to work with my WS2300 and I found the problem in date setting: the address 0x0207 should be used instead of 0x024D. Thank you for your fine job. Renzo Clerico

-- RenzoClerico - 30 Mar 2008

Yep, that should do it. Glad it is working for you.

I'll try and find some time to update the patch (should just be a two char change), although I'll also update the memory_map_2300.txt file to be up to date with the OpenWSMemoryMap page on this site, at least with respect to the date/time info.

-- GrantGardner - 31 Mar 2008

South Africa also do not have a DCF signal, so this is a very usefull feature. I have used this patch with the 0x0207 change and it works well.

-- JohnHay - 12 Nov 2008

Topic revision: r5 - 12 Nov 2008, JohnHay
Copyright © 1999-2018 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
This website only use harmless session cookies. See Cookie Policy for details. By using this website you accept the use of these cookies.