Portability fix
This commit is contained in:
@@ -32,6 +32,7 @@
|
||||
#include <string.h>
|
||||
#include <libxml/tree.h>
|
||||
#include <err.h>
|
||||
#include <time.h>
|
||||
#include "meta.h"
|
||||
#include "odt.h"
|
||||
#include "options.h"
|
||||
@@ -101,11 +102,13 @@ int main(int argc, char* argv[]) {
|
||||
xmlChar* doc;
|
||||
char templateFileName[FILENAME_MAX];
|
||||
char timestamp[20];
|
||||
time_t tm;
|
||||
time_t t;
|
||||
struct tm ts;
|
||||
|
||||
/* get timestamp */
|
||||
time(&tm);
|
||||
strftime(timestamp, 20, "%Y-%m-%dT%H:%M:%S", localtime(&tm));
|
||||
time(&t);
|
||||
localtime_r(&t, &ts);
|
||||
strftime(timestamp, 20, "%Y-%m-%dT%H:%M:%S", &ts);
|
||||
|
||||
xmlDocDumpMemoryEnc(transformed, &doc, &sz, "utf-8");
|
||||
entry[0].path = "content.xml";
|
||||
|
||||
Reference in New Issue
Block a user