diff options
Diffstat (limited to 'src/bltGrPSOutput.C')
-rw-r--r-- | src/bltGrPSOutput.C | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/src/bltGrPSOutput.C b/src/bltGrPSOutput.C index 8ef802b..6d7f2e1 100644 --- a/src/bltGrPSOutput.C +++ b/src/bltGrPSOutput.C @@ -31,6 +31,7 @@ #include <math.h> #include <stdlib.h> #include <string.h> +#include <time.h> #include "tk.h" @@ -458,16 +459,12 @@ int PSOutput::preamble(const char* fileName) format("%%%%Creator: (%s %s %s)\n", PACKAGE_NAME, PACKAGE_VERSION, Tk_Class(graphPtr_->tkwin_)); - char date[200]; -#ifndef _WIN32 time_t ticks = time((time_t *) NULL); + char date[200]; strcpy(date, ctime(&ticks)); char* newline = date + strlen(date) - 1; if (*newline == '\n') *newline = '\0'; -#else - strcpy(date,"Unknown"); -#endif format("%%%%CreationDate: (%s)\n", date); format("%%%%Title: (%s)\n", fileName); |