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:
ac-stef
2016-09-04 15:00:00 +02:00
parent c7c02521ad
commit bc2a091f95
4 changed files with 22 additions and 6 deletions
+1 -1
View File
@@ -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;
}