So I wanted to timestamp the data stream which I am sending over the cloud. I used Time.zone() to set the time zone and used Time.now() to get the current unix time. However, at the time of compilation, it is showing an error that Time does not name a type. It was working on the web IDE but seems to generate this error on the desktop IDE.
You also need to select the target version you want to build for. Just selecting the target device does not automatically set the device OS version.
That's why we'd need to see the code.
You can't do that. This is a function call and function calls are not allowed in the declaration/definition section but only inside a function.
What doesn’t seem to be the case?
You sait that worked in Web IDE, I contradicted and did show evidence for my contradiction, so my understanding and yours didn’t really align on that matter.
I had the same error and just put Time.zone() in the setup function.
I seem to remember, that it can also happen when you are trying to use Time.now() in a function call that expect variables to be of certain type, such as Particle.publish.