It seems there is a bug that happens on iOS when the phone is set to 24-hour mode. It seems to ignore the TimeFormat when you try to get the time string from the ticks value.
Here is the log output:
Converted time = 07:00
Turn off 24-hour mode on the phone and you get:
Converted time = 07:00 AM
I think the result should be the same regardless of the time mode the phone is in. Am I missing something or is this a bug?
B4X:
DateTime.TimeFormat="HH:mm"
Dim TimeVal=DateTime.DateTimeParse(DateTime.Date(DateTime.Now),"07:00") As Long
DateTime.TimeFormat="hh:mm a"
Log("Converted time = "&DateTime.Time(TimeVal))
Here is the log output:
Converted time = 07:00
Turn off 24-hour mode on the phone and you get:
Converted time = 07:00 AM
I think the result should be the same regardless of the time mode the phone is in. Am I missing something or is this a bug?