Since the time stamp must be compared with the background interface, the foreground gets the timestamp first. The first is to get the phone local time, but the user changed the time to waste .....
Later on from the server to get time to convert to timestamp (is not very fucked, first get on the server in the TM comparison), but the background directly to me a time stamp is not finished it?
Just give me a moment to turn around and the problem comes.
[CSharp]View PlainCopy
- var resdata = ' 2017-3-14 10:03:45 '
- Console.log ("return time:" + resdata)
- var time = Date.parse (new Date (Resdata))/1000;
This way, development tools, mobile phone development, mobile experience version are no problem. But I am poor and a use of the Android phone, with the Apple said nothing ... Then start looking for the problem and find out that iOS gets the time converted Nan.
The first time the mobile phone end .....
All kinds of degrees Niang after know, Crooked Fruit founder Interbank FX only recognize 2017/3/14.
Instead, replace can only replace the first one, and the regular all
[CSharp]View PlainCopy
- var resdata = ' 2017-3-14 10:03:45 ';
- Resdata=resdata. Replace (/-/g, '/');
- Console.log ("return time:" + resdata);
- var time = Date.parse (new Date (Resdata))/1000;
var data1 = new Date ();
var data2 = parseint (Data1.gettime ()/1000);
Console.log (DATA2)
var stringTime1 = "2017/08/16 10:00:00";
var stringTime2 = "2017/09/30 11:59:00";
var timestamp1 = date.parse (new Date (stringTime1));
TIMESTAMPS1 = timestamp1/1000;
TIMESTAMPS2 = timestamp2/1000;
Alert (data1+ ":" +data2+ ":" +timestamps1+ ":" +TIMESTAMPS2)
Alert (typeof (Data2) + ":" +typeof (TIMESTAMPS1) + ":" +typeof (TIMESTAMPS2))
Fix applet in Data.parse () get timestamp iOS incompatible