using snprintf_P in function

I'm trying to write a function that will return a formatted time for output to serial, LCD, or webserver. I created a function to return a pointer to a char array with a formated time in it. I am having trouble getting snprintf_P to do my bidding when I use it in the function call. I can make it work if I create a char array in the function, but I want it to work by passing a pointer to a char array and have the function return a pointer to the same char array. I know that sounds confusing. Probably simpler to see my example code below.

The example code below returns:
5
5:40:01 PM Oct 22, 2012

I expect it to return:
5:40:01 PM Oct 22, 2012
5:40:01 PM Oct 22, 2012

Any ideas why snprintf_P doesn't work as I expect it to in the first function call?

#include <Time.h>

//****************************************************************
void setup() {
  Serial.begin(115200);

  setTime(17,40,1,22,10,2012);  //setTime(hr,min,sec,day,mnth,yr)
  char timebuf[30];
  time_t tnow = now();
  Serial.println(format_tA(timebuf,tnow));
  Serial.println(format_tB(timebuf,tnow));
}

//****************************************************************
char* format_tA(char* t_bufA, time_t tA){
  snprintf_P(t_bufA,sizeof(t_bufA),PSTR("%d:%02d:%02d %s %s %d, %4d"),
             hourFormat12(tA),minute(tA),second(tA),(isPM(tA) ? "PM" : "AM"),
             monthShortStr(month(tA)),day(tA),year(tA));
  return t_bufA;
}

//****************************************************************
char* format_tB(char* t_bufB, time_t tB){
  char temp[30];
  snprintf_P(temp,sizeof(temp),PSTR("%d:%02d:%02d %s %s %d, %4d"),
             hourFormat12(tB),minute(tB),second(tB),(isPM(tB) ? "PM" : "AM"),
             monthShortStr(month(tB)),day(tB),year(tB));
  return strcpy(t_bufB,temp);
}

void loop() {
}
char* format_tA(char* t_bufA, time_t tA){
  snprintf_P(t_bufA,sizeof(t_bufA),PSTR("%d:%02d:%02d %s %s %d, %4d"),
             hourFormat12(tA),minute(tA),second(tA),(isPM(tA) ? "PM" : "AM"),
             monthShortStr(month(tA)),day(tA),year(tA));
  return t_bufA;
}

Passing a pointer to some memory to the function means that the function can modify the memory pointed to. Why you then need to return that pointer is mystery.

Why do you pass the size of a pointer to snprintf?

Why do you pass the size of a pointer to snprintf?

Doing so explains why you only get one character written to the array. That and the trailing NULL are all that fit in a "2 element array".

@PaulS
That doesn't realy answer my question, but.... By returning the pointer to the memory location that was passed and modified in the function, I can use the funtion call in-line in the print statements. This is the same way strcpy, strcat, etc all work. They both modify a buffer and return a pointer to the buffer.

If I just modify the pointer to memory location, I then have to call the function in one statement and print the results of the modified buffer in the next statement. For me, I like keeping it all on one line. Does that help with the mystery?

@Groove
Doh!!! I believe you just nailed my problem. The pointer obviously only has a length of one, which is exactly the length of my output. Will correct.

Thanks.

The pointer obviously only has a length of one, which is exactly the length of my output.

Wrong. The pointer has a size of 2.

Problem solved! Thanks for the expert help!