On 2008-11-13, Juri Mianovich <[EMAIL PROTECTED]> wrote:
> But the statusbar just has a "??" in it for "%ukdate", even though that
> script exists.

The monitor must of course be modified to use the correct meter names...

> ALSO, I am not sure how I would edit statusd_ukdate.lc to have a +7 hours
> in its 'date' command, since the .lc file is not text, but just binary
> data.

... for which you need to modify the original .lua file.

> My second attempt was to just change the default date_format line in
> cfg_statusbar.lua to output multiple dates:
>
> date_format='%a %Y-%m-%d %H:%M (US) || %a %Y-%m-%d %H:%M (UK)
>
> This ^^^ DOES work, but I do not see how to modify the:
>
> %a %Y-%m-%d %H:%M
>
> to add a +7 offset to %H ...

There's no simple way. The date monitor supports multiple
simultaneous date formats (rtf config file), so one could
add a zone option for them, and modify the values in the
date table.

But I'm not sure this will have the correct effect. You see, 
we have this excellent demonstration of the idiocy of mankind, 
called daylight saving time. And the times it changes, are 
different for different locales.

So, I'm not actually sure you can get good multi-zone dates
from libc without Awful Hacks, as it does not support specifying
the zone from your code, just through the environment or other 
configuration files. Better multi-zone dates would probably 
involve a programming effort with some library better suited 
to that. Or calling an external program that does it, which 
is a bit too resource-intensive for a time display monitor. 

However, libc does support UTC/GMT in addition to the local
tie zone, and Lua should display that if you start the format
string with '!'.

-- 
Be an early adopter! Beat the herd! Choose Windows today!

Reply via email to