My 005 did a firmware update a few hours ago, and now time() (on device) returns only 3-4 digits (I am assuming the last digits - not exactly sure if the update caused this to be honest). Agent code returns fine, but device code is not. Here is a pretty print of a bull message:
Time is set when the device connects to the server and can process inbound packets - if your code is running without yield from boot then the time wouldn’t be set correctly, I believe.
If you run code like this:
server.log("this forces a connect"); imp.onidle(function() { server.log(time()); });
The behaviour you describe is expected on imp005 in release-33.28 and earlier; subsequent releases should be getting the time right once connected to the server (assuming the server is actually providing a timestamp). We currently intend to provide a fully working RTC on imp005 (one which on a warm boot works even before connected to the server) in the next major release.
Thank you! I would like to note the performance of the 005 is great. Some of the calculations I had trouble performing quick enough before on the 002 now take about 1/10th the time.