Php time acquisition is 8 hours different, and php time retrieval is 8 hours different
Php time difference: 8 hours by Wu xueying
Date_default_timezone_set ('prc ');
$ TimeStr = date ("Y-m-d H: I: s", time ());
Adding this sentence on the server can solve the problem of AFNetWorking parsing json.
Error Domain = NSCocoaErrorDomain Code = 3840 "The operation couldn't be completed. (Cocoa error 3840 .) "(JSON text did not start with array or object and option to allow fragments not set .) userInfo = 0x196463f0 {NSDebugDescription = JSON text did not start with array or object and option to allow fragments not set .}
PHP is 8 hours different
Add date_default_timezone_set ('prc') directly on the php page; // This sentence is used to eliminate the time difference
PHP uses the COOKIE acquisition time, which is eight hours different from the system time. The Code is as follows:
Date_default_timezone_set ("prc ");