Error passing a `time_t` and `struct tm`, ESP32
void myIOT32::convEpoch(time_t in_time, struct tm *convTime)
{
  convTime = gmtime(&amp;in_time);


Here you are overwriting the parameter convTime. There is no point in
passing such a parameter if you are not going to use the value provided.

void sendnewNotif()
{
  struct tm *newtime;
  time_t t=182423032;
  iot.convEpoch(t, newtime); // &lt;--- Using the conversion


newtime is initially uninitialized. The call to iot.convEpoch()
doesn't change that (the parameter is passed by value, not by
reference).

  Serial.print(newtime-&gt;tm_year);


This is dereferencing an uninitialized pointer, which is undefined
behavior and can crash the program.

The simplest solution I see is to have myIOT32::convEpoch() return the
pointer it got from gmtime(). Note that this points to static storage,
which makes the method not reentrant.

Example (not tested):

struct tm *myIOT32::convEpoch(time_t in_time)
{
  struct tm *convTime = gmtime(&amp;in_time);
  // ...
  return convTime;
}

void sendnewNotif()
{
  time_t t = 182423032;
  struct tm *newtime = iot.convEpoch(t);
  Serial.print(newtime-&gt;tm_year); 
}