How to update time in lua to reflect system timezone change during execution?
问题 Problem I want to modify the awful.widget.textclock widget in awesome-wm to immediately reflect a change in the system timezone. This widget and all of the awesome-wm config is written in lua. Currently, if the system timezone is changed the widget continues to display the time according to the timezone set at runtime. The widget uses the os.time function to retrieve the time, but this does not match the system time. Solution as provided below lua script: local tz=require"luatz"; require