HarveyHunt / i3situation

A replacement for i3status written in Python 3 with support for huge customisability through plugins.
GNU General Public License v3.0
34 stars 5 forks source link

removed default TZ #10

Closed wanderer closed 10 years ago

wanderer commented 10 years ago

removes the default TZ (GMT) from the time plugin because python usually get the right time zone from the system.

HarveyHunt commented 10 years ago

Thanks for the PR!

I think it would probably be best to not delete the time_zone from the options, I don't want users having to change the plugin's code. Instead, perhaps time_zone could be set to None?

Then your code would be like:

self.options = {'time_zone': None, 'long_format': '%d-%m-%Y %H:%M:%S', 'short_format': '%H:%M:%S', 'interval': 1, 'menu_command': ''}

...

if self.options['time_zone']: os.environ['TZ'] = self.options['time_zone']

Thoughts?

wanderer commented 10 years ago

yeah good idea!

HarveyHunt commented 10 years ago

Thanks for the PR. :+1: