diff -urN tetex-src-3.0.orig/texk/dvipdfm/pdfdoc.c tetex-src-3.0/texk/dvipdfm/pdfdoc.c --- tetex-src-3.0.orig/texk/dvipdfm/pdfdoc.c 2005-12-06 16:03:23.000000000 +0100 +++ tetex-src-3.0/texk/dvipdfm/pdfdoc.c 2006-05-23 17:25:49.000000000 +0200 @@ -234,7 +234,7 @@ { #ifndef HAVE_TIMEZONE #ifdef TM_GM_TOFF - #define timezone (bdtime->gm_toff) + #define timezone (bd_time->tm_gmtoff) #else #define timezone 0l #endif /* TM_GM_TOFF */ @@ -242,15 +242,26 @@ static char date_string[24]; time_t current_time; struct tm *bd_time; + long hh, mm; if (debug) { fprintf (stderr, "(asn_date)"); } time(¤t_time); bd_time = localtime(¤t_time); - 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, - -timezone/3600, timezone%3600); + if (timezone == 0l) { + sprintf (date_string, "D:%04d%02d%02d%02d%02d%02dZ00'00'", + 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); + } else { + hh = timezone/3600; + mm = (timezone%3600)/60; + if (timezone < 0) + mm = -mm; + 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, + hh, mm); + } return date_string; }