From 0e0168f4d4e3f48c972a6b5bf37826e08a57007f Mon Sep 17 00:00:00 2001 From: Jef Driesen Date: Fri, 28 Dec 2012 07:06:29 +0100 Subject: [PATCH] Log the date/time and version in the example applications. --- examples/utils.c | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/examples/utils.c b/examples/utils.c index 5c14e73..46ac07f 100644 --- a/examples/utils.c +++ b/examples/utils.c @@ -23,6 +23,9 @@ #include #include +#include +#include + #include "utils.h" static FILE* g_logfile = NULL; @@ -90,5 +93,12 @@ void message_set_logfile (const char* filename) #else gettimeofday (&g_timestamp, NULL); #endif + dc_datetime_t dt = {0}; + dc_ticks_t now = dc_datetime_now (); + dc_datetime_gmtime (&dt, now); + message ("DATETIME %u-%02u-%02uT%02u:%02u:%02uZ (%lu)\n", + dt.year, dt.month, dt.day, dt.hour, dt.minute, dt.second, + (unsigned long) now); + message ("VERSION %s\n", dc_version (NULL)); } }