mirror of
https://github.com/Ascend/ascend-docker-runtime.git
synced 2025-10-28 21:41:45 +08:00
Match-id-bf669790dbad3a219dfd4c4011ba8916f2ba81b9
This commit is contained in:
@@ -17,7 +17,7 @@
|
|||||||
#define MONTH_OFFSET 1
|
#define MONTH_OFFSET 1
|
||||||
#define LOG_LENGTH 1024
|
#define LOG_LENGTH 1024
|
||||||
|
|
||||||
int GetCurrentLocalTime(char* buffer, int length)
|
int GetCurrentLocalTime(char* buffer)
|
||||||
{
|
{
|
||||||
time_t rawtime;
|
time_t rawtime;
|
||||||
struct tm* timeinfo = NULL;
|
struct tm* timeinfo = NULL;
|
||||||
@@ -73,7 +73,7 @@ void WriteLogFile(char* filename, long maxSize, char* buffer, unsigned bufferSiz
|
|||||||
if (fp != NULL) {
|
if (fp != NULL) {
|
||||||
int ret;
|
int ret;
|
||||||
char now[TEMP_BUFFER] = {0};
|
char now[TEMP_BUFFER] = {0};
|
||||||
ret = GetCurrentLocalTime(now, sizeof(now) / sizeof(char));
|
ret = GetCurrentLocalTime(now);
|
||||||
if (ret < 0) {
|
if (ret < 0) {
|
||||||
fclose(fp);
|
fclose(fp);
|
||||||
return;
|
return;
|
||||||
|
|||||||
Reference in New Issue
Block a user