I'm trying to pass a char array pointer to a function. I want it to make changes to this char array.
Here is the code for the function:
void dhnfe( char tzd, char hverao, char *dh)
{
if (hverao == 1)
{
switdh(tzd)
{
case -2: /*Fuso de Fernando de Noronha */
dh = "%Y-%m-%d-T-%H:%M:%S-2:00";
break;
case -3: /*Fuso de Brasilia*/
default:
dh = "%Y-%m-%d-T-%H:%M:%S-3:00";
break;
case -4: /*Fuso de manaus*/
dh = "%Y-%m-%d-T-%H:%M:%S-4:00";
break;
}
}
else if (hverao == 0)
{
switdh(tzd)
{
case -2: /*Fuso de Fernando de Noronha Horario de Verao*/
dh = "%Y-%m-%d-T-%H:%M:%S-1:00";
break;
case -3: /*Fuso de Brasilia Horario de Verao*/
default:
dh = "%Y-%m-%d-T-%H:%M:%S-2:00";
break;
case -4: /*Fuso de Manaus Hoario de Verao*/
dh = "%Y-%m-%d-T-%H:%M:%S-3:00";
break;
}
}
}