Using client.print in multiple functions within the same call

I have code that sends sensor data to the web. However, the code has flaws now that I am trying t send alarm times as well in the same call. At a particular time, I make a request and send data to a file. I am trying to send alarm times in that call, but one function calls another that calls another. And somewhere in between that data isn’t being sent.

The code is pasted below. Is it possible to have one function call the alarm times rather than other functions? Is it possible that I am making multiple client.println at the end of each time I am sending which may terminate or misinterpret the line therefore not sending anything back? I have sent RTC time to the web not needing to send the colons in between the hour and minutes and seconds so I don’t need those in order for proper formatting.

#include “Wire.h”
#include “DS1307RTC.h”
#include “DHT.h”
#include “PID_v1.h”
#include “SPI.h”
#include “Time.h”
#include “TimeAlarms.h”
#include “WiFi.h”
#include “stdio.h”

char server = “To the Server”; //IPAddress server(54,200,69,220);
char ssid = “Name”; //SSID Home Network Name
char pass = “Key”; //Key or Network Password
int status = WL_IDLE_STATUS;
WiFiClient client;
int ww= 30;

AlarmID_t firstAlarm;
AlarmID_t secondAlarm;
AlarmID_t third;

void setup()
{
Serial.begin(9600);
setTime(8,29,40,1,1,10); // set time to 8:29:40am Jan 1 2010

firstAlarm = Alarm.alarmRepeat(8,30,0, MorningAlarm); // 8:30am every day
secondAlarm = Alarm.alarmRepeat(17,45,0,EveningAlarm); // 5:45pm every day
third=Alarm.alarmRepeat(8,30,4, Hello);
Alarm.alarmRepeat(8,29,48, Trial);
while ( status != WL_CONNECTED) {
status = WiFi.begin(ssid, pass);
}
} //End of Void Setup

void MorningAlarm()
{
Serial.println(“Alarm: - turn lights off”);
}

void EveningAlarm()
{
Serial.println(“Alarm: - turn lights on”);
}

void Hello()
{
Serial.println(“FINALLY”);
}

void loop() {
//
Alarm.delay(0);
}

void Trial()
{

if (client.connect(server, 80)) {

client.print(“GET http:xx?”);
client.print("&ww=");
client.print(ww);
client.print("&firstAlarm=");
showAlarmTime(firstAlarm);
client.print("&SecondAlarm=");
showAlarmTime(secondAlarm);
client.print("&third=");
showAlarmTime(third);

}

}

void showAlarmTime(AlarmID_t id)
{
time_t alarmTime = Alarm.read(id);
digitalClockDisplay(alarmTime);
}
void digitalClockDisplay(time_t t)
{
client.print(hour(t));
// client.print(":");
if (minute(t)<10)
client.print(‘0’);
if (minute(t)<10)
client.print(‘0’);
client.print(minute(t));
//client.print(":");
if (second(t)<10)
client.print(‘0’);
client.print(second(t));
client.println();
}

Is this the same question as your last one in Displaying Alarm Times from other functions - Programming Questions - Arduino Forum ?

Not exactly, The question you referred before pertains to actually identifying if integrating multiple functions into one function can be done. I still need to ask you on that particular question how to do that but thats neither here nor there. This question pertains to the integration of sensor data, and sending the alarm time to the web. They are very much related but I felt that this was a different question in itself therefore should result in a new topic.

I have replied to the specific question in the other thread.