summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/stuff.cc
diff options
context:
space:
mode:
Diffstat (limited to 'crawl-ref/source/stuff.cc')
-rw-r--r--crawl-ref/source/stuff.cc17
1 files changed, 17 insertions, 0 deletions
diff --git a/crawl-ref/source/stuff.cc b/crawl-ref/source/stuff.cc
index fa7c276f68..b447c4be30 100644
--- a/crawl-ref/source/stuff.cc
+++ b/crawl-ref/source/stuff.cc
@@ -142,6 +142,23 @@ std::string make_time_string(time_t abs_time, bool terse)
return buff.str();
}
+std::string make_file_time(time_t when)
+{
+ if (tm *loc = TIME_FN(&when))
+ {
+ char buf[25];
+ snprintf(buf, sizeof buf, "%04d%02d%02d-%02d%02d%02d",
+ loc->tm_year + 1900,
+ loc->tm_mon + 1,
+ loc->tm_mday,
+ loc->tm_hour,
+ loc->tm_min,
+ loc->tm_sec);
+ return (buf);
+ }
+ return ("");
+}
+
void set_redraw_status(unsigned long flags)
{
you.redraw_status_flags |= flags;