I have been trying to use the SysTime Library to set the the time and date on a WM6.5 phone, It does not seem to change the date or time, can anyone see what I am doing wrong?
B4X:
Sub App_Start
' Form1.Show
resp = GetText("http://www.mywebservice.co.uk/AnyJunk/php/getDateTime.php")
' resp = "2010-05-25T10:50:48"
Dim year As int32
Dim month As int32
Dim day As int32
Dim Hours As int32
Dim Minutes As int32
Dim Secs As int32
year = SubString (resp, 0, 4)
month = SubString (resp, 5, 2)
day = SubString (resp, 8, 2) + 1
Hours = SubString (resp, 11, 2)
Minutes = SubString (resp, 14, 2)
Secs = SubString (resp, 17, 2)
Systime.New1
Systime.SetDate(month, day ,year)
Systime.SetTime(Hours, Minutes, Secs)
today = Systime.GetDate & " : " & Systime.GetTime
Msgbox(today)
Systime.Dispose
End Sub
Sub GetText (URL)
Response.New1
Request.New1(URL)
Response.Value = Request.GetResponse 'This line calls the server and gets the response.
String = Response.GetString 'Get the Response string.
Response.Close
Return String
End Sub
Last edited: