MCPcopy Create free account
hub / github.com/DentonW/DevIL / iMakeString

Function iMakeString

DevIL/src-IL/src/il_tiff.cpp:1095–1112  ·  view source on GitHub ↗

----------------------------------------------------------------------------*/ Makes a neat date string for the date field. From http://www.awaresystems.be/imaging/tiff/tifftags/datetime.html : The format is: "YYYY:MM:DD HH:MM:SS", with hours like those on a 24-hour clock, and one space character between the date and the time. The length of the string, including the terminating NUL, is 20 bytes.)

Source from the content-addressed store, hash-verified

1093// time. The length of the string, including the terminating NUL, is
1094// 20 bytes.)
1095char *iMakeString()
1096{
1097 static char TimeStr[20];
1098 time_t Time;
1099 struct tm *CurTime;
1100
1101 imemclear(TimeStr, 20);
1102
1103 time(&Time);
1104#ifdef _WIN32
1105 _tzset();
1106#endif
1107 CurTime = localtime(&Time);
1108
1109 strftime(TimeStr, 20, "%Y:%m:%d %H:%M:%S", CurTime);
1110
1111 return TimeStr;
1112}
1113
1114/*----------------------------------------------------------------------------*/
1115

Callers 1

iSaveTiffInternalFunction · 0.85

Calls 1

timeClass · 0.85

Tested by

no test coverage detected