user53987: I have a question on how to convert EPOCH timestamps, which I receive as char*, into DD.MM.YYYY and HH:MM:SS format seperately?
Here are more information to my Arduino project: The Arduino is receiving through an ESP8266 module three different EPOCH timestamps from the OpenWeatherMap API for sunrise,sunset and the current date. I want these 3 informations to be displayed on an 1,3" OLED display, the date in DD.MM.YYYY and the other two timestamps in HH:MM format.
I was looking in several time libraries like TimeLib and RTC for a solution, but I wasn't able to find one.
That's my code fragment on receiving the timestamps:
DynamicJsonBuffer jsonBuffer(4096);
JsonObject& root = jsonBuffer.parseObject(client);

const char* date = root["dt"];
const char* sunrise = root["sys"]["sunrise"];
const char* sunset = root["sys"]["sunset"];

How to convert those timestamps?

user37622: Epoch are seconds from 1970-01-01. Get it from JSON as unsigned long. They are a number in the returned JSON (no ") 
from https://openweathermap.org/ doc:
"sys":{"country":"JP","sunrise":1369769524,"sunset":1369821049},

to convert it to string with TimeLib.h:
#include <TimeLib.h>
#include <ArduinoJson.h>

void setup() {

  Serial.begin(115200);

  const char* json = "{\"country\":\"JP\",\"sunrise\":1369769524,\"sunset\":1369821049}";

  DynamicJsonBuffer jsonBuffer;
  JsonObject& root = jsonBuffer.parseObject(json);

  unsigned long t = root["sunrise"];

  char buff[32];
  sprintf(buff, "%02d.%02d.%02d %02d:%02d:%02d", day(t), month(t), year(t), hour(t), minute(t), second(t));

  Serial.println(buff);
}

void loop() {
}


53987: <p>I have a question on how to convert EPOCH timestamps, which I receive as char*, into DD.MM.YYYY and HH:MM:SS format seperately?</p>

<p>Here are more information to my Arduino project: The Arduino is receiving through an ESP8266 module three different EPOCH timestamps from the OpenWeatherMap API for sunrise,sunset and the current date. I want these 3 informations to be displayed on an 1,3" OLED display, the date in DD.MM.YYYY and the other two timestamps in HH:MM format.</p>

<p>I was looking in several time libraries like TimeLib and RTC for a solution, but I wasn't able to find one.</p>

<p>That's my code fragment on receiving the timestamps:</p>

<pre><code>DynamicJsonBuffer jsonBuffer(4096);
JsonObject&amp; root = jsonBuffer.parseObject(client);

const char* date = root["dt"];
const char* sunrise = root["sys"]["sunrise"];
const char* sunset = root["sys"]["sunset"];
</code></pre>

<p>How to convert those timestamps?</p>
 37622: <p>Epoch are seconds from 1970-01-01. Get it from JSON as unsigned long. They are a number in the returned JSON (no <code>"</code>) </p>

<p>from <a href="https://openweathermap.org/" rel="nofollow noreferrer">https://openweathermap.org/</a> doc:</p>

<p><code>"sys":{"country":"JP","sunrise":1369769524,"sunset":1369821049},</code></p>

<hr>

<p>to convert it to string with TimeLib.h:</p>

<pre><code>#include &lt;TimeLib.h&gt;
#include &lt;ArduinoJson.h&gt;

void setup() {

  Serial.begin(115200);

  const char* json = "{\"country\":\"JP\",\"sunrise\":1369769524,\"sunset\":1369821049}";

  DynamicJsonBuffer jsonBuffer;
  JsonObject&amp; root = jsonBuffer.parseObject(json);

  unsigned long t = root["sunrise"];

  char buff[32];
  sprintf(buff, "%02d.%02d.%02d %02d:%02d:%02d", day(t), month(t), year(t), hour(t), minute(t), second(t));

  Serial.println(buff);
}

void loop() {
}
</code></pre>
