todoagenda icon indicating copy to clipboard operation
todoagenda copied to clipboard

Widget is stuck in another timezone after travelling

Open gbakeman opened this issue 3 years ago • 11 comments

Using Todo Agenda 4.5.6 OnePlus 6T, Android 9

I rarely travel, but after returning home from a trip, the agenda widget is stuck in the timezone of my trip destination, causing all events to show in that timezone. I've been home for nearly 24 hours and the timezone remains in the old zone. If I look at the Other settings menu for the widget, under Lock time zone, it says Unlocked, current zone: [Old timezone]. My device acquires the current timezone automatically from the network it's connected to, and it changed almost instantly when I returned.

gbakeman avatar Aug 15 '22 18:08 gbakeman

Please look deeper at any concrete event that is opened clicking on it in the widget. That event should have time and time zone... Maybe time zone in that event is wrong?!

yvolk avatar Aug 20 '22 16:08 yvolk

I will admit that creating events in a different timezone was rather confusing, but no, the widget settings clearly stated the entire widget was set to a different timezone. The only workaround I've found was deleting and recreating the widget.

gbakeman avatar Aug 20 '22 16:08 gbakeman

Our widget allows to export events and settings for debugging, so please next time create it for investigation.

yvolk avatar Aug 21 '22 06:08 yvolk

Having the same problem, what can I do to help debug?

rassie avatar Sep 10 '22 22:09 rassie

Hi @rassie Please see my advices above.

yvolk avatar Sep 11 '22 17:09 yvolk

@yvolk I just checked the widget again, it seems to have reverted to the right timezone after two days. Can't create debugging info now, sorry. Will do next time!

rassie avatar Sep 11 '22 17:09 rassie

I have the same problem: If the time zone gets automatically changed (because the phone logs into a mobile network in a different time zone), the times in the agenda list does not get updated. It takes some time for the agenda list to display the new times. If I edit an appointment, the agenda list gets updated immediately.

I have not tried the Update button in the header but that might help. Still it would be nice, if the times gets updated automatically …

sphh avatar Feb 15 '23 10:02 sphh

I just had a similar problem after changing time zones. The update button also didn't work, nor did removing and re-adding the widget. But what did work, was to go to the App Info in the settings (long press the widget usually shows a shortcut for this) and "force stop" the app. Next time I clicked on the widget, it updated to the correct date and time zone.

Hope this helps others that have these problems. Though a restart of your device would probably achieve the same result.

arucard21 avatar Mar 21 '23 02:03 arucard21

As I figured out, the problem was caused by usage of org.joda.time.DateTimeZone#getDefault that has this note: "If the java.util.TimeZone default is updated after calling this method, then the change will not be picked up here" This explains, why app (or device) restart was needed to pick up the changed Time zone.

I fixed the issue, will be included in the next release

yvolk avatar Dec 31 '23 15:12 yvolk

Excellent work, thank you!

gbakeman avatar Dec 31 '23 16:12 gbakeman

I released this fix in v.4.8.0, please see https://github.com/andstatus/todoagenda/releases/tag/4.8.0-release

yvolk avatar Jan 03 '24 13:01 yvolk