show map timestamp in map info menu
also: more stuff in the map settings menu getmaptimestamp fmt Returns the "last written" timestamp of the current map in the requested format. If fmt starts with "U", the time is given as UTC, otherwise as local time. If fmt is empty, or not given or just the "U", the format defaults to "YYYYMMDD_hh.mm.ss". Use "%c" to get something nicer. DOCREF getmaptimestamp
This commit is contained in:
@@ -26,7 +26,7 @@ const char *timestring(time_t t, bool local, const char *fmt, char *buf)
|
||||
struct tm *timeinfo, b;
|
||||
timeinfo = local ? localtime_r(&t, &b) : gmtime_r(&t, &b);
|
||||
#endif
|
||||
strftime(buf, sizeof(string) - 1, fmt ? fmt : "%Y%m%d_%H.%M.%S", timeinfo); // sortable time for filenames
|
||||
strftime(buf, sizeof(string) - 1, fmt && *fmt ? fmt : "%Y%m%d_%H.%M.%S", timeinfo); // sortable time for filenames
|
||||
return buf;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user