Changeset 38730 in vbox for trunk/src/VBox
- Timestamp:
- Sep 13, 2011 12:57:58 PM (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Runtime/common/misc/s3.cpp
r38285 r38730 126 126 { 127 127 /* Date header entry */ 128 #if 0 /** @todo r=bird: Use RTTimeNow(), RTTimeExplode() and RTStrPrintf? */ 129 RTTIMESPEC TimeSpec; 130 RTTIME Time; 131 RTTimeExplode(&Time, RTTimeNow(&TimeSpec)); 132 133 static const char s_apszDayNms[7][4] = { "Mon", "Tue", "Wed", "Thu", "Fri", "Sat", "Sun" }; 134 static const char s_apszMonthNms[1+12][4] = 135 { "???", "Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec" }; 136 char *pszDate; 137 RTStrAPrintf(&pszDate, "Date: %s, %02u %s %04d %02u:%02u:%02u UTC", 138 s_apszDayNms[Time.u8WeekDay], 139 Time.u8MonthDay, 140 s_apszMonthNms[Time.u8Month], 141 Time.i32Year, 142 Time.u8Hour, 143 Time.u8Minute, 144 Time.u8Second); 145 #else 128 146 time_t tt = time(NULL); 129 147 char* pszDate = (char*)RTMemAlloc(128); 130 148 strftime(pszDate, 128, "Date: %a, %d %b %Y %H:%M:%S UTC", gmtime(&tt)); 149 #endif 131 150 132 151 return pszDate;
Note:
See TracChangeset
for help on using the changeset viewer.