|
|
|
|
|
|
|
|
char TimestampBfr[20]; // Create a small buffer.
|
|
|
char TimestampBfr[20]; // Create a small buffer.
|
|
|
tm* gmt; // Get a ptr to a tm structure.
|
|
|
tm* gmt; // Get a ptr to a tm structure.
|
|
|
gmt = gmtime(&t); // Fill it with UTC.
|
|
|
gmt = gmtime(&t); // Fill it with UTC.
|
|
|
sprintf(TimestampBfr,"%04d%02d%02d%02d%02d%02d\0", // Format yyyymmddhhmmss
|
|
|
|
|
|
|
|
|
sprintf(TimestampBfr,"%04d%02d%02d%02d%02d%02d", // Format yyyymmddhhmmss
|
|
|
gmt->tm_year+1900,
|
|
|
gmt->tm_year+1900,
|
|
|
gmt->tm_mon+1,
|
|
|
gmt->tm_mon+1,
|
|
|
gmt->tm_mday,
|
|
|
gmt->tm_mday,
|