1
0
Fork 0
mirror of https://github.com/opentx/opentx.git synced 2025-07-15 04:15:26 +03:00

Fixes #2934: shortened screen-shot file name (screen-2013-01-01-123540.bmp), also affects EEPROM backup which uses same time-stamp generation function.

This commit is contained in:
Damjan Adamic 2015-10-10 12:46:01 +02:00
parent f4dc2caedf
commit a30ddb7437
3 changed files with 10 additions and 11 deletions

View file

@ -245,16 +245,14 @@ char * strAppendDate(char * str, bool time)
div_t qr = div(utm.tm_hour, 10);
str[13] = '0' + qr.rem;
str[12] = '0' + qr.quot;
str[14] = '-';
qr = div(utm.tm_min, 10);
str[16] = '0' + qr.rem;
str[15] = '0' + qr.quot;
str[17] = '-';
str[15] = '0' + qr.rem;
str[14] = '0' + qr.quot;
qr = div(utm.tm_sec, 10);
str[19] = '0' + qr.rem;
str[18] = '0' + qr.quot;
str[20] = '\0';
return &str[20];
str[17] = '0' + qr.rem;
str[16] = '0' + qr.quot;
str[18] = '\0';
return &str[18];
}
else {
str[11] = '\0';