Bump version
[libdcp.git] / src / metadata.cc
index 2967ac1ddf0183a437b9112b48b7847db7027cf5..acbc3b2ed36fb7bcdc07084d5cd684f28cdb3451 100644 (file)
  *  @brief Metadata for writing to the DCP.
  */
 
+#include <sstream>
+#include <iomanip>
 #include <time.h>
+#ifdef LIBDCP_WINDOWS
+#include <windows.h>
+#endif
 #include "metadata.h"
+#include "util.h"
 
 using namespace std;
 using namespace libdcp;
@@ -46,11 +52,7 @@ XMLMetadata::XMLMetadata ()
 void
 XMLMetadata::set_issue_date_now ()
 {
-       char buffer[64];
-       time_t now;
-       time (&now);
+       time_t now = time (0);
        struct tm* tm = localtime (&now);
-       strftime (buffer, 64, "%Y-%m-%dT%I:%M:%S+00:00", tm);
-       issue_date = string (buffer);
+       issue_date = tm_to_string (tm);
 }
-