diff options
author | Jonathan Kew <jfkthame@googlemail.com> | 2006-12-20 23:02:46 +0000 |
---|---|---|
committer | Jonathan Kew <jfkthame@googlemail.com> | 2006-12-20 23:02:46 +0000 |
commit | bc4a995000d7adee634bcf3ba5404d93fa86bcd4 (patch) | |
tree | 35c18abac221ea2fa1f1d9aa721e888acdf46e74 /Build/source/texk/xdvipdfmx/src | |
parent | fbc259bbc2ef84e1f778a4563d8d1e690f5ed76f (diff) |
timezone changes from dvipdfmx (rev2828) merged into xdvipdfmx
git-svn-id: svn://tug.org/texlive/trunk@2829 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Build/source/texk/xdvipdfmx/src')
-rw-r--r-- | Build/source/texk/xdvipdfmx/src/pdfdoc.c | 24 |
1 files changed, 9 insertions, 15 deletions
diff --git a/Build/source/texk/xdvipdfmx/src/pdfdoc.c b/Build/source/texk/xdvipdfmx/src/pdfdoc.c index c6d0d386ae8..1a18c7beb74 100644 --- a/Build/source/texk/xdvipdfmx/src/pdfdoc.c +++ b/Build/source/texk/xdvipdfmx/src/pdfdoc.c @@ -1,4 +1,4 @@ -/* $Header: /home/cvsroot/dvipdfmx/src/pdfdoc.c,v 1.43 2005/09/06 04:17:15 chofchof Exp $ +/* $Header: /home/cvsroot/dvipdfmx/src/pdfdoc.c,v 1.44 2006/12/20 08:10:13 chofchof Exp $ This is dvipdfmx, an eXtended version of dvipdfm by Mark A. Wicks. @@ -490,7 +490,13 @@ pdf_doc_set_eop_content (const char *content, unsigned length) static long asn_date (char *date_string) { -#if 0 /* this is non-portable, as not all systems have the tm_gmtoff field */ +#ifndef HAVE_TIMEZONE +# ifdef HAVE_TM_GMTOFF +# define timezone (-bd_time->tm_gmtoff) +# else +# define timezone 0l +# endif /* not HAVE_TM_GMTOFF */ +#endif /* not HAVE_TIMEZONE */ time_t current_time; struct tm *bd_time; @@ -499,21 +505,9 @@ asn_date (char *date_string) sprintf(date_string, "D:%04d%02d%02d%02d%02d%02d%+03ld'%02ld'", bd_time->tm_year + 1900, bd_time->tm_mon + 1, bd_time->tm_mday, bd_time->tm_hour, bd_time->tm_min, bd_time->tm_sec, - -(bd_time->tm_gmtoff / 3600), (bd_time->tm_gmtoff % 3600) / 60); + (-timezone / 3600), (timezone % 3600) / 60); return strlen(date_string); -#else /* simplified version that should work everywhere */ - time_t current_time; - char *time_str; - int len; - time(¤t_time); - time_str = ctime(¤t_time); - strcpy(date_string, time_str); - len = strlen(date_string); - if (len > 0 && date_string[len-1] == '\n') - date_string[--len] = '\0'; - return len; -#endif } static void |