Changeset e46ad71 in nscp
- Timestamp:
- 11/10/07 09:37:53 (6 years ago)
- Branches:
- master, 0.4.0, 0.4.1, 0.4.2, stable
- Children:
- 860f310
- Parents:
- 3ece2bd
- File:
-
- 1 edited
-
include/strEx.h (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
include/strEx.h
r478588b re46ad71 42 42 inline std::string format_date(time_t time, std::string format) { 43 43 char buf[51]; 44 struct tm nt; 45 if (gmtime_s(&nt, &time) != 0) 44 struct tm *nt = new struct tm; 45 #if (_MSC_VER < 1300) // 1300 == VC++ 7.0 46 if (gmtime_s(nt, &time) != 0) 46 47 return ""; 47 size_t l = strftime(buf, 50, format.c_str(), &nt); 48 #else 49 nt = gmtime(&time); 50 if (nt == NULL) 51 return ""; 52 #endif 53 size_t l = strftime(buf, 50, format.c_str(), nt); 48 54 if (l <= 0 || l >= 50) 49 55 return "";
Note: See TracChangeset
for help on using the changeset viewer.








