开发者

May the conversion to Unix time to date fail on some Samsung Android devices?

I am currently doin开发者_如何学编程g a transportation app that displays the departure/arrival time of some trains in my country.

That is done via a webservice that gives me a JSON result that I format into HH:mm:

long attributeTime = departureArray.getJSONObject(i).getLong("time") * 1000;
Date time = new Date(attributeTime);
trains.add(new Train(hourFormatter.format(time),...)

This work pretty well on all my devices (Nexus S, HTC Desire, Acer STream, etc..) but I get some feedback from Samsung users that complain that my app gives one hour delayed results.

As the Market does not allow me to contact them, so I cannot ask them for more information. Their devices seem to be 2*Galaxy S and 1 * Ace, so the issue seem related to Samsung.

Have other people already had this issue with Samsung phones? Is there any workaround for that?


A delay of 1 hour likely has to do with timezone in some capacity. This could have to do with some bug in Samsung's software that incorrectly applies time zone information or it could be due to user location. If your code works on the other devices the problem is likely hardware/location/user/settings specific and I would venture a guess that it's going to be impossible to remedy this problem without access to the affected devices or at least a log file.

If you really wanted to dig into this, I would suggest releasing an update to the app that allows users to submit a log file to you which you could then analyze to determine the problem. However, that isn't exactly a trivial solution.


Perhaps is location instead of brand? One hour delay sounds like some problem with the locale and daylight savings time.

BTW, my Captivate works fine with Dates (EST time).

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜