Hey guys, Has anyone here ever had to determine th...
# android
m
Hey guys, Has anyone here ever had to determine the difference in time between two timestamps from various time zones, such as UTC and IST for example? If so, how did you resolve this? I am struggling quite a bit and I appreciate your help.
not kotlin but kotlin colored 3
c
All depends on what “difference in time” in interpreted as. One option is to calculate the difference in UTC, but that may not align with your business needs.
m
yep
p
Translate to a common timezone, let's say 0 latitude, then take the translation to millis and substract
m
ok I will give it a try
tried many methods so far
👍 1