How to have Clock widgets with multiple timezones
Solution 1:
You can specify a timezone and offset for a command using the TZ
environment variable (see man timezone
). For example, TZ=NZST-12 date +%H:%M
prints the time in New Zealand, 12 hours east of UTC. In conky you could show this with, for example,
conky.config = {
update_interval = 5,
};
conky.text = [[
${execi 10 TZ=NZST-12 date +%H:%M }
]];
This runs the command every 10 seconds, so the minutes may change upto 10 seconds late. If you change the 10 to 1, you also need to reduce the update_interval
to 1 too.