I am receiving the unix time in my sketch with the following statement:
time_t T = now();
Later on, I am working with the Json library, and when I try to put the value of T ,as a parameter of the Json, the compilation throws an error.
I think the reason is the type of T, so I am looking for how can I change the format of the variable.
Since the unix time is for example: "145889885" I can change it into a int, float or String it does not matter.
If anyone have solution I will be very glad.
Thanks for your time.
We have no idea how to solve your problem because we can't see it. Please post your code using code tags. The code tags make the code look
like this
when posting source code files. It makes it easier to read, and can be copied with a single mouse click. Also, if you don't do it, some of the character sequences in the code can be misinterpreted by the forum code as italics or funny emoticons.
Unless the sketch is too large, it's better if you post your code, rather than attach it. When it's attached, we have to download it, create a folder then open your code in our IDE. Or perhaps open it in WordPad, which isn't very good for looking at code. And afterwards, the folder remains unless we navigate to the "Temp" folder and manually remove it. It's much easier to just view the code in your post.