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

Sunrise/Sunset times display in UTC #123

Open
bmhieserich opened this issue Oct 27, 2022 · 6 comments
Open

Sunrise/Sunset times display in UTC #123

bmhieserich opened this issue Oct 27, 2022 · 6 comments
Assignees
Labels
bug Something isn't working

Comments

@bmhieserich
Copy link

bmhieserich commented Oct 27, 2022

Sunrise and sunset data are displaying in UTC regardless of local time zone, which also causes the icon in the system taskbar on KDE Plasma to display incorrectly, presenting nighttime icons until the local time passes the UTC sunrise time (if UTC says 1:00 pm but local sunrise time is 8:00 am, then the icon will stay a nighttime moon icon until 1:00 pm local time), and likewise for sunset, displaying a sun at nighttime until sunset time in UTC (local sunset at 6:00 pm but plasmoid lists as 11:00 pm untranslated from UTC). An example is below.

Note that data and icons in the graph when clicking on the plasmoid are correct, it is just this tooltip and the icon in the taskbar that are incorrect.

Screenshot_20221027_133811

@blackadderkate blackadderkate self-assigned this Oct 28, 2022
@blackadderkate blackadderkate added the bug Something isn't working label Oct 28, 2022
@blackadderkate
Copy link
Owner

Hmm.
LOCAL suggests this is an OWM location, rather than Met.No...

In which case it looks I've made a stupid mistake in the code - it says LOCAL, even if your preferences are set to "My Local TIme" or "UTC"... That should be a fairly quick fix.

Fixing the icon might be a bit trickier. I won't know for sure until I start digging into the code...

Will look at it tomorrow - it's past my bedtime.

blackadderkate added a commit that referenced this issue Oct 28, 2022
Fix issue #123 "Sunrise/Sunset times display in UTC"
@blackadderkate
Copy link
Owner

I have just uploaded a fix for this issue.

Please try downloading and installing this new beta version.

@bmhieserich
Copy link
Author

bmhieserich commented Oct 28, 2022

Unfortunately the fix did not work. It still presents me with the UTC time. This is what it shows me now:
Screenshot_20221028_093515
It's bright and sunny outside.

EDIT: This may actually be an issue with the way my Linux distro handles time. If you are using the hardware/system time to display the sunrise-sunset times, then that may explain it. Reading into it, for some wacky reason my distro chose to have the time showing on my clock be an offset to my region while keeping the system time at UTC, apparently. I'm going to see if I can set the actual system time to the correct time and see if that makes a difference.

@blackadderkate
Copy link
Owner

I'll need to spool up my development Virtual Machine and do some further testing...

Potentially stupid question - have you set the timezone preference to "Location Timezone" correctly?
Screenshot_20221028_170348

Also, did you restart Plasma / logoff and back on again after upgrading the widget?

@bmhieserich
Copy link
Author

I have tried confirming my hardware clock is set to UTC and setting it to my local time, and changing the time zone on my system, all to no avail. I've tried using all three Timezone settings in the widget each time, and it consistently presents me with UTC under local-time and Location Timezone and moves it to UTC+5 when I set it to UTC in the widget (my local time zone is UTC-5 currently). The widget seems to want to read my local time as UTC no matter how I set my clock. I also made sure to reboot after each reset of my hardware or system clock.

@ArchangeGabriel
Copy link

I also have the same issue. Both local timezone settings exhibit this behaviour.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants