So I played at little more with it this morning to see if I could come up with something a little less verbose. And this what I came up with.
void setTime()
{
Process Set;
int year;
byte month, day, hour, minute, second, hundredths;
//gps.crack_datetime(&year, &month, &day, &hour, &minute, &second, &hundredths);
year = 2012;
day = 2;
month = 9;
hour = 18;
minute = 5;
second = 46;
char command[36];
sprintf(command, "date --set '%04d-%02d-%02d %02d:%02d:%02d'\0",
year, month, day, hour, minute, second);
Set.runShellCommand(command);
/*
String command;
command = "date --set '";
command += year;
command += "-";
command += month;
command += "-";
command += day;
command += " ";
command += hour;
command += ":";
command += minute;
command += ":";
command += second;
command += "'";
Set.runShellCommand(command);
*/
}
That also works for me, but it actually uses 1278 bytes more code space and 138 more variable space, so I would stay with the verbose version. I think it is the sprintf function that add the space, so if you use it extensively other places, it might not add as much.
I see that you use the sprintf function one place in your code for diagnostic output. You might try to comment it out to see how much space you can regain from that.