Here's my proposal for time support. I'm trying to get a _simple_ version of
the following implemented and sent to Manuel as a set of diffs by the end of
tomorrow. Using it will be the real test, but here's a quick preview in the
hope someone has suggestions/advice/insights.
+ found msntp which appears to work on the Soekris and takes 38k - sntp
client and server!
(See http://www.freebsd.org/cgi/url.cgi?ports/net/msntp/pkg-descr) (vs >200k
+ I'll enable it as daemon to keep clock updated, optional as server (see
+ need to give the OS a timezone to work effectively (or else use GMT
+ will use web page drop downs to help user build valid posix timezone
+ add new entry on main settings page to set timezone (system.php)
+ new entries in <system> section of config.xml, e.g.:
for timezone and how many minutes between forced clock updates - 0 for never
+ new link under Services to configure optional time server details
+ new entry in <m0n0wall> section for sntp server control:
<timeserver>time.nist.gov</timeserver> // space delimited list
<broadcastinterval>0</broadcastinterval> // 0 or omitted means
+ sntp = simple ntp - relatively new addition to ntp standard, but broadly
+ modern style timezone setting by country/city requires 800k - no way!
+ possibly add the file /usr/share/zoneinfo/posixrules to provide default
USA daylight savings (hate to be US-centric but that's what the posix
standard defaults to and there's slightly bizarre behaviour if we omit it -
see my PS below)
+ msntp barfs on WinXP's built-in braindead time request, but it will be
simple to patch (according to its author) - next version!
By choosing TZ as POSIX compatible we take up minimal space but add
complexity for users to specify the daylight saving info. We could
additionally prompt for common daylight savings rules and build it for them
(e.g. http://webexhibits.org/daylightsaving/g.html has a good list), but
I'll start simple!
Comments and suggestions heartily welcomed!
PS: It was a real pain to work out the timezone details. I couldn't get the
TZ setting to be recognised at all. At first I thought it was a problem with
php not exporting the environment settings correctly (PHP putenv() doesn't
imply export/setenv), but it wasn't. I eventually worked out that setting
TZ=PST8 worked, while TZ=PDT8PST failed (i.e. date showed GMT). It turns out
unless you either have a /usr/local/shared/posixrules file or a full
daylight savings rule spec in the TZ or NO daylight savings specified (e.g.
PST8), then date (etc.) defaults to GMT. Makes sense - afterwards :-)