Fail to convert time_T from past to tm struct Continuing a Question asked few days ago, answered by Edgar, a new question has rised:
My goal was using a past time_t value, and convert it into a struct tm variable in order to  use it, part as a Char to print a readable text and some for logic queries.
At start NTP is configured as:
void myIOT32::startNTP(const int gmtOffset_sec = 2 * 3600, const int daylightOffset_sec = 3600, const char *ntpServer = &quot;pool.ntp.org&quot;)
{
  configTime(gmtOffset_sec, daylightOffset_sec, ntpServer);
}

and every-time I need to get epoch and or struct tm of current time I call this function
void myIOT32::getTime()
{
  int a = 0;
  while (a &lt; 3)
  {
    if (getLocalTime(&amp;timeinfo))
    {
      delay(100);
      time(&amp;epoch_time);
    }
    a++;
  }

BUT, when using the following function I get not GMT (+3) reference as needed :
struct tm *myIOT32::convEpoch(time_t in_time)
{
  struct tm *convTime = gmtime(&amp;in_time);
  //char time_char[40];
  //sprintf(time_char, &quot;%04d-%02d-%02d %02d:%02d:%02d&quot;, convTime-&gt;tm_year + 1900, convTime-&gt;tm_mon + 1, convTime-&gt;tm_mday,
          convTime-&gt;tm_hour, convTime-&gt;tm_min, convTime-&gt;tm_sec);
  return convTime;
}

Meaning I get to correct epoch time, but strcut tm is 3 hrs earlier ( and no, I do not want to hard-code +3... )
replacing gmtime(&amp;timeinfo) with localtime(&amp;timeinfo) in myIOT32::convEpoch passes definition of time-zone as needed.
for more information in this cpluspls site