Closed christianrauch closed 2 years ago
Right, this is probably due to how we derive the date. We just convert startdate into a ISO-8601 format date:
{
"startdate":"20220527",
"fullstartdate":"202205272300",
"enddate":"20220528","url":"/th?id=OHR.PurnululuNP_EN-GB6729482920_1920x1080.jpg&rf=LaDigue_1920x1080.jpg&pid=hp",
"urlbase":"/th?id=OHR.PurnululuNP_EN-GB6729482920",
"copyright":"Bungle Bungle Range in Purnululu National Park, Australia (© Francesco Riccardo Iacomino/Getty Images)",
...}
As in 2022-05-27 in this case, it would have updated at 11pm on that date in your region (about 18 hours before). (In my region it updates at 5pm.) It might be more appropriate to use the following day or the day that best covers the 24-hour period from 'fullstartdate'.
(NOTE: historically Bing used to always update at midnight in the region, so the current treatment of dates worked well.)
So one approach would be to delay the presentation of the 'current' image until it a user defined time of day (say 8am), and then label each image according to the day it is first presented to the user (the date at 8am), rather than the date Bing publishes it. (Which in the UK case is 11pm the day before.) This would require a bit of calendar math, and a way to present this in preferences.
That said I think it's pretty achievable.
I think the extension should use the fullstartdate
or whatever https://www.bing.com is using. Is the fullstartdate
in the local time zone or UTC? In either case, converting this to the local time to match with the system time should be fairly easy.
It's UTC, yeah and as you note trivial to convert.
It's still somewhat awkward for some zones though, so having an user defined offset might be a good idea.
Last updated in menu:
It's UTC, yeah and as you note trivial to convert.
It's still somewhat awkward for some zones though, so having an user defined offset might be a good idea.
Isn't there API in GNOME Shell to do these conversions?
Yep not reinventing the wheel, I mean when a new image is presented to a user rather than what date is presented.
Describe the bug
It appears as if the image is not updated periodically. The given date in the extension UI is 1 day delayed.
Screenshots The image was updated on the 27th, but today is the 28th.
To Reproduce Steps to reproduce the behavior:
Desktop (please complete the following information):
Additional context It would be useful to be able to set the condition for updating the image, e.g. when waking up from suspend etc, or periodically, e.g. every 4 hours. And it would be good to see when the image was last (time and date) updated.