Hello dear StackOverflow users, tell me why the "OpenWeatherMap" API returns different timeStamp on different phones (devices based on the Android operating system)?

http://api.openweathermap.org/data/2.5/forecast?q=Kremenchuk,ua&units=metric&appid=Key

And so, there is a weather forecasting service: OpenWeatherMap. For free use, he can return the weather forecast for five days with a frequency of three hours, for each forecast he sets the date and time for exactly what time this forecast. And it turned out that on one device it returns in hours: on 3, 6, 9, 12, 15, 18, 21, 00. On the other: 2, 5, 8, 11, 14, 17, 20, 23. In one same application.

Who can explain what is the reason for this behavior and what does it depend on? After all, the request does not specify a time zone or something similar.

  • Are you sure that the server gives a different stamp, and not the devices display it according to their settings? Usually the network transmits time to UTC . Well, besides the address bar there are also headers (cookies in particular) - maybe there is something transmitted. - woesss

1 answer 1

Maybe the case in the encoding of the transmitted object name and it finds it differently in the database? This is just a guess ...

Try to determine the object ID for these devices. Or add the parameter type = [like | accurate], it improves the accuracy of searching by name.