CorruptedArk / did-i-take-my-meds

A Kotlin Android app to manage medications
GNU General Public License v3.0
175 stars 15 forks source link

[Bug] Editing a taken dose time in 24H format is mapping to wrong AM/PM time&day on select #47

Closed QueerCodingGirl closed 2 years ago

QueerCodingGirl commented 2 years ago

Describe the bug When i edit the time of a dose already taken the time i select on a 24H wheel gets mapped to the wrong AM or PM time&day. This happens when pressing OK in the time selection popup. The time i selected is not the same as the new time displayed before saving. Example: My selection of 22:30 is converted to 10:30, either on the same or the next day. When i press on the time again to fix this, the selection popup and the value in the app seem even more out of sync due to time conversions, i guess.

To Reproduce Steps to reproduce the behavior:

  1. Have a phone with a system clock set to use the 24H format
  2. edit the time of a taken dose AND actually change the time on the time wheel! (if you have trouble to reproduce this, change the time over the 12 o'clock mark)
  3. See the wrong time and sometimes day before pressing the checkmark to save. On save the wrong time&day will be saved, not the correct one. This suggests it is more than just a display bug.

Expected behavior The time i actually selected gets displayed and saved, without changing the day when i did'nt touch the day.

Smartphone (please complete the following information):

CorruptedArk commented 2 years ago

Good catch, this is a weird one. I have to investigate what's going wrong

CorruptedArk commented 2 years ago

I figured it out, it was some stupid stuff

QueerCodingGirl commented 2 years ago

@CorruptedArk Thanks for the fast fix! Do you know how long it takes until the release is available over f-droid? I can't even see the release before this one yet (1.6.2)

CorruptedArk commented 2 years ago

It depends, but usually at least a week. Google Play will typically have the release within 1-2 days

QueerCodingGirl commented 2 years ago

fyi: f-droid rolled out the release today and i tested this issue on my device. The issue is fixed, thank you very much!