Вопрос

I stumbled upon a weird bug that i cannot figure a work around for. If I go to iphone settings and set the time manually to an hour earlier, but leave the timezone unchanged, all the requests to simpleDB result in a timeout. I need a way to either get the time automatically inside the application, or to send a different timestamp to simpleDB so that it will be an hour later.

This is the exception:

AmazonServiceException { RequestId:605914f0-94fb-a152-4206-06c2d0b777da, ErrorCode:RequestExpired, Message:Request has expired. Timestamp date is 2013-06-20T09:18:27.431Z. Current date is 2013-06-20T10:18:28Z }

Is there any way to solve this?

Это было полезно?

Решение 2

I found my answer here: link The thing that does the trick is this:

[AmazonSDKUtil setRuntimeClockSkew:3600.0];

It leaves the user with figuring out the actual time of the device, which can be done using CoreLocation.

Другие советы

Amazon allows only a small time stamp variation up to 15 minutes between the server and its requesting client (user pc). As Amazon is a big backup server of large number of users, security does matter a lot. Synchronization of time between the server and the requesting client is very important to have an access to Amazon.To get rid of this problem you have to adjust the client's timing so that there is maximum time stamp difference up to 15 minutes.To get rid of this problem set the standard timing and the zone for your system.

Лицензировано под: CC-BY-SA с атрибуция
Не связан с StackOverflow
scroll top