X-Git-Url: https://git.carlh.net/gitweb/?a=blobdiff_plain;f=src%2Fmetadata.cc;h=acbc3b2ed36fb7bcdc07084d5cd684f28cdb3451;hb=refs%2Ftags%2Fv0.84;hp=2967ac1ddf0183a437b9112b48b7847db7027cf5;hpb=fca67f5661c55db6d4206cd17f4cdcf7ede865da;p=libdcp.git diff --git a/src/metadata.cc b/src/metadata.cc index 2967ac1d..acbc3b2e 100644 --- a/src/metadata.cc +++ b/src/metadata.cc @@ -21,8 +21,14 @@ * @brief Metadata for writing to the DCP. */ +#include +#include #include +#ifdef LIBDCP_WINDOWS +#include +#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); } -