Changeset 1779 for trunk/gsdl/lib


Ignore:
Timestamp:
2000-12-11T12:03:48+13:00 (23 years ago)
Author:
sjboddie
Message:

Implemented LogDateFormat configuration option.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/gsdl/lib/gsdltimes.cpp

    r1778 r1779  
    117117}
    118118
    119 // returns current date and time formatted like "Thu Dec 7 23:43:38 2000"
     119// returns current date and time formatted like "Thu Dec 7 23:43:38 GMT 2000"
    120120// if ltime is true return value will be expressed in local time, otherwise
    121121// it'll be Coordinated Universal Time (UTC)
     
    123123text_t get_date (bool ltime) {
    124124
    125   char *timestr;
     125  char *timestr = new char[128];
    126126  tm *tm_ptr = NULL;
    127127  time_t t = time(NULL);
     
    130130  if (tm_ptr == NULL) return "";
    131131
    132   strftime (timestr, 128, "%a %b %e %T %Y", tm_ptr);
     132  strftime (timestr, 128, "%a %b %e %T %Z %Y", tm_ptr);
    133133  text_t ret = timestr;
     134  delete timestr;
    134135  return ret;
    135136}
Note: See TracChangeset for help on using the changeset viewer.