* @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;
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);
}
-