Your new topic does not fit any of the above??? Check first. Then post here. Thanks.

Moderator: igrr

User avatar
By TonisKipper
#93619 Hello!
I have searched a lot of internet but can't find answer how to convert timestamps to human readable format.
I get a info from api json timestamp + according data.
From this api https://dashboard.elering.ee/api/nps/pr ... %3A59.999Z

Please help how coud i convert this timestamp.
Thank you.
User avatar
By TonisKipper
#93654 This can be closed as i have found a easy solution.
eztime. library for mu nodemcu project.

If someone is searching this in future then
answer is : ( at least for me)

time_t t = timestamp; // + utcDifferece if want to get your local time
String datetime = String(year(t)) + "/" + String(month(t)) + "/" + String(day(t)) + " - " + String(hour(t)); // if needed exact then add //+String(minute(t))+":"+String(second(t)) etc.

Thank you
User avatar
By TonisKipper
#93660
rpiloverbd wrote:Hello, would you please elaborate a bit more? Do you wish to use an ESP8266 for this conversion or you're using anything else?


Hi, these post here appear with a lazy loading :D
So as u can see above i have found solution. But answering to your question then yes im using 8266 for my project. A bit about it also.
As there has been high energy prices i thought that i will make my own simple relay witch finds the best affordable time to switch on. And from that i started to learn programming again :) have been 20 years when i last did it :) So lot to learn.