{ "secondScoreAbs", ArgBoolean, (void *) &appData.secondScoreIsAbsolute, FALSE, (ArgIniType) FALSE },
   { "pgnExtendedInfo", ArgBoolean, (void *) &appData.saveExtendedInfoInPGN, TRUE, (ArgIniType) FALSE },
   { "hideThinkingFromHuman", ArgBoolean, (void *) &appData.hideThinkingFromHuman, TRUE, (ArgIniType) FALSE },
+  { "pgnTimeLeft", ArgBoolean, (void *) &appData.cumulativeTimePGN, TRUE, (ArgIniType) FALSE },
   { "liteBackTextureFile", ArgFilename, (void *) &appData.liteBackTextureFile, TRUE, (ArgIniType) "" },
   { "lbtf", ArgFilename, (void *) &appData.liteBackTextureFile, FALSE, INVALID },
   { "darkBackTextureFile", ArgFilename, (void *) &appData.darkBackTextureFile, TRUE, (ArgIniType) "" },
         if(r) { // must be put in group r
           char *p = strstr(q, r);
           if(p) { // group already exists
-            p += strlen(r); // determine insertion point (immediately after group header line)
+            p += strlen(r) - 1; // determine insertion point (immediately after group header line)
             *(char **) ad->argLoc = malloc(l+2);
             *p++ = NULLCHAR; // spit old value (q) at insertion point into q and p
-            snprintf(*(char **) ad->argLoc, l+2, "%s%s\n%s", q, s, p); // insert (with newline)
+            snprintf(*(char **) ad->argLoc, l+2, "%s\n%s\n%s", q, s, p); // insert (with newline)
           } else { // group did not exist, create at end
             l += strlen(r) + 8;
             *(char **) ad->argLoc = malloc(l);
 
                    snprintf(buf, MSG_SIZ, " %d:%02d%c", seconds/60, seconds%60, 0);
                }
 
+           if(appData.cumulativeTimePGN) {
+               snprintf(buf, MSG_SIZ, " %+ld", timeRemaining[i & 1][i+1]/1000);
+           }
+
             snprintf( move_buffer, sizeof(move_buffer)/sizeof(move_buffer[0]),"{%s%.2f/%d%s}",
                      pvInfoList[i].score >= 0 ? "+" : "",
                      pvInfoList[i].score / 100.0,
 
     Boolean scoreIsAbsolute[ENGINES];  /* If true, engine score is always from white side */
     Boolean saveExtendedInfoInPGN; /* If true, saved PGN games contain extended info */
     Boolean hideThinkingFromHuman; /* If true, program thinking is generated but not displayed in human/computer matches */
+    Boolean cumulativeTimePGN;     /* If true, times saved in PGN extended info is time left on clock */
     Boolean useBitmaps;
     Boolean useFont;
     Boolean useBorder;
 
 If this option is set, XBoard saves depth, score and time used for each 
 move that the engine found as a comment in the PGN file.
 Default: false.
+@item -pgnTimeLeft true/false
+@cindex pgnTimeLeft, option
+If this option is set, XBoard will save the remaining clock time for
+the player that has just moved as part of the @samp{pgnExtendedInfo},
+rather than the time that player thought about his latest move.
+Default: false.
 @item -pgnEventHeader string
+Default: false.
 @cindex pgnEventHeader, option
 Sets the name used in the PGN event tag to string. 
 Default: "Computer Chess Game".