Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Date & Time crashes when clicking on the map if timezone is set to localtime #12148

Open
fulalas opened this issue Apr 6, 2024 · 0 comments
Open

Comments

@fulalas
Copy link

fulalas commented Apr 6, 2024

 * cinnamon-control-center version 6.0.1
 * Distribution - (PorteuX 1.2 x64)
 * AMD 780M with Mesa 24.0.4

Issue
Having timezone set to localtime crashes the application when clicking on the map:

Traceback (most recent call last):
  File "/usr/share/cinnamon/cinnamon-settings/modules/cs_calendar.py", line 194, in _on_proxy_ready
    self.proxy_ready_callback()
  File "/usr/share/cinnamon/cinnamon-settings/modules/cs_calendar.py", line 77, in _on_proxy_ready
    self.tz_selector.set_timezone(self.zone)
  File "/usr/share/cinnamon/cinnamon-settings/modules/cs_calendar.py", line 263, in set_timezone
    region, city = timezone.split('/', maxsplit=1)
    ^^^^^^^^^^^^
ValueError: not enough values to unpack (expected 2, got 1)

The problem is in /usr/share/cinnamon/cinnamon-settings/modules/cs_calendar.py. Original code:

    def set_timezone(self, timezone):
        if timezone == "Etc/UTC" or timezone == "Universal":
            return

Changing to this fixes the issue:

    def set_timezone(self, timezone):
        if timezone == "Etc/UTC" or timezone == "Universal" or timezone == "localtime":
            return

However, maybe there's a safer solution, like returning if timezone equals Etc/UTC or doesn't have /

@leigh123linux leigh123linux transferred this issue from linuxmint/cinnamon-control-center Apr 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant