Wrong time is shown

I have two identical codes as start exactly the same in Google sheets. The time differ 6 hours between them. Can anyone explain it? And can I add 6 hours to the row rowData[1]….
(I’m in Sweden so GMT is +1)

function doGet(e) {

  Logger.log(JSON.stringify(e)); // view parameters

  var result = 'Ok'; // assume success

  if (e.parameter == 'undefined') {

    result = 'No parameters';
  } else {

    var sheet_id = '1GmZEd4skdjZCJUnS-vvIJQNqrAMJrvO0-Prh1vBpmVw'; // Spreadsheet ID 

    var sheet = SpreadsheetApp.openById(sheet_id).getActiveSheet(); // get Active sheet

    var newRow = sheet.getLastRow() + 1;

    var rowData = [];

    d = new Date();

    rowData[0] = d; // Timestamp in column A

    rowData[1] = d.toLocaleTimeString([], {
      hour: '2-digit',
      minute: '2-digit'
    }); // Timestamp in column B


    for (var param in e.parameter) {

      Logger.log('In for loop, param=' + param);

      var value = stripQuotes(e.parameter[param]);