| 4 | #include <codecvt> |
| 5 | |
| 6 | char* timestamp(string64& dest) |
| 7 | { |
| 8 | string64 temp; |
| 9 | |
| 10 | /* Set time zone from TZ environment variable. If TZ is not set, |
| 11 | * the operating system is queried to obtain the default value |
| 12 | * for the variable. |
| 13 | */ |
| 14 | _tzset(); |
| 15 | u32 it; |
| 16 | |
| 17 | // date |
| 18 | _strdate(temp); |
| 19 | for (it = 0; it < xr_strlen(temp); it++) |
| 20 | if ('/' == temp[it]) |
| 21 | temp[it] = '-'; |
| 22 | strconcat(sizeof(dest), dest, temp, "_"); |
| 23 | |
| 24 | // time |
| 25 | _strtime(temp); |
| 26 | for (it = 0; it < xr_strlen(temp); it++) |
| 27 | if (':' == temp[it]) |
| 28 | temp[it] = '-'; |
| 29 | strcat(dest, temp); |
| 30 | return dest; |
| 31 | } |
| 32 | |
| 33 | char* xr_strdup(const char* string) |
| 34 | { |
no test coverage detected