2 Replies Latest reply on Feb 23, 2015 1:12 AM by Siegmund Leducq

    Programmatically set time on SB1

    David Carew

      The device resets the time whenever it is restarted. We need to have the time in sync with our server and we cannot expect our users to manually set the time every time they use the device.  The programmers guide says that we can call the InvokeMETAFunction method of the generic object. I tried setting the time via this method using the format described here Rhomobile | SystemTime Module

       

      As far as I can tell that didn't work (at least trying to access the time via JavaScript new Date() did not return the expected  time after updating it via the  generic.InvokeMETAFunction.method)

       

      So 2 questions

      1) Can I set the time on the SB1 via generic.InvokeMETAFunction or some other programmatic method ?

      2) If yes whats' the correct way to access the updated time. Will new Date() suffice or is there specific SB1 call to get the time ?

       

      Thank you