~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to client/drizzle.cc

Merged solaris gcc build fixes.

Show diffs side-by-side

added added

removed removed

Lines of Context:
128
128
#endif
129
129
 
130
130
#include <iostream>
131
 
#include <functional>
132
131
#include <map>
133
132
 
134
133
using namespace std;
4334
4333
    {
4335
4334
      int getHour;
4336
4335
      int getYear;
4337
 
      char* dateTime= NULL;
 
4336
      /* Room for Dow MMM DD HH:MM:SS YYYY */ 
 
4337
      char dateTime[32];
4338
4338
      switch (*++c) {
4339
4339
      case '\0':
4340
4340
        // stop it from going beyond if ends with %
4439
4439
        add_int_to_prompt(t->tm_year+1900);
4440
4440
        break;
4441
4441
      case 'D':
4442
 
        dateTime = ctime(&lclock);
4443
 
        processed_prompt->append(strtok(dateTime,"\n"));
 
4442
        strftime(dateTime, 32, "%a %b %d %H:%M:%S %Y", localtime(&lclock));
 
4443
        processed_prompt->append(dateTime);
4444
4444
        break;
4445
4445
      case 's':
4446
4446
        if (t->tm_sec < 10)