The android's Location documentation states that it provides UTC. Is that UTC with or without leap seconds?
There are many questions regarding wether Java accounts for leap seconds, most of them leaning to say that it does not, ambiguous before java 7 and clearly afterwards.
However, getTime()
relies on the gps time, which does not account for leap seconds. Does location add them? I doubt so but I would like to be sure and the documentation is unclear.
And moreover, does SimpleDateFormat account them when set to timeZone("UTC")
? (I know UTC is not a time zone, but apparenly TimeZone.getTimeZone("UTC")
is valid)
A similar question is indirectly asked here: Ticks between Unix epoch and GPS epoch. Where it's proven that Date.getTime
does not take into account UTC leap seconds. The question is, does Location.getTime
also ignore them? I guess so, even thought the documentation states that it reports UTC, it can't (unless periodically updated) and most likely won't.