App Inventor Clock problem

So my prior statement about the beginning of time was incomplete.

The question should not have been
"When did time begin?", but instead should be
"When and where did time begin?"

3 Likes

lol @ABG :smiley:

1 Like

Thank you @ABG for these deeper insights and clarifications. :+1:
This should be added to the FAQ.

2 Likes

(added to FAQ)

2 Likes

Certifico los errores de los métodos de AI2 para calcular las diferencias de tiempos en horas, minutos, segundos entre dos fechas (o instantes de tiempos) debido al UTC determinado por la corrección de la zona geográfica del equipo. Lo he solucionado realizando los cálculos internos en lugar de utilizar los métodos que facilita AI2 ya que sus resultados son incorrectos.


A user told me that he had the same problem, that he was getting the wrong time when the sum "crossed" midnight.

With @ABG and @TIMAI2's comments about ZONE_OFFSET, I made this little example.

I get the ZONE_OFFSET and add (or subtract) it to the time.

Note that if you go to Settings and change the Time Zone of your mobile, the ZONE_OFFSET changes, but the calculation remains correct.

p66A_suma_hora.aia (3.6 KB)

https://www.baeldung.com/java-daylight-savings