Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8282035
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 8, 20262026-06-08T10:14:14+00:00 2026-06-08T10:14:14+00:00

Here is my issue from the beginning…I really need someones help…. I needed to

  • 0

Here is my issue from the beginning…I really need someones help….

I needed to create an event booking system for my business. I created a Google form to enter bookings into a spreadsheet and then i needed some code to automatically transfer this data to the relevant Google calendars in my account. I found someone to create this code, shared the google form/spreadsheet with them so they could create the code.

BELOW IS THE CODE THEY CREATED:

I can enter the information into the form, making submitions and they all appear on the correct date and you can see by the code it will create an all day event (if i have entered all day in one of the columns) based on the start time (startdt).

My issue is that all of a sudden my correct entries start to appear a day early in my calendar when i submit them. This happened to happen to any entries i submitted after 11pm. I am not sure what the issue is but i believe that it might be to do with timezone.
I am based in the UK which it GMT+0000, the person who made the script for me is based in India. I have read that when you change the timezone of a script, the triggers do not automatically change with it (they stay as the original timezone).

Could this be what is causing my entries to all of a sudden appear a day early in my calendar if i submit them after a certain time, even though everything in spreadsheet is correct???

I can temporarily fix the issue by editing the code to create all day event based on end time (enddt) instead of startdt but this only works for a short while.. Until 11AM possibly then i have to change the code back?? Its all very confusing.

If its a timezone issue can someone please tell me how i find out the timezone of my triggers and if they are wrong how do i edit the timezone of my triggers in the script please. I am really stuck as i need this to make bookings for my buisness without the confusion of having them appear on the wrong dates.

All of my calenders, spreadsheet, form, and script are GMT+0000

I will copy and paste my script below and embolden the all day event section i can edit to temporerily sort the problem until it changes back again if it helps?

var ss = SpreadsheetApp.getActive();
/*function onEdit(e) {
   var doc = SpreadsheetApp.getActiveSheet();
setRowColors();
Browser.msgBox("Trigger it");
}*/

function onEdit(event){
  var doc = SpreadsheetApp.getActiveSheet();
  var r = event.source.getActiveRange();
  var currentCol = r.getColumn();
 // Browser.msgBox("currentCol:- "+currentCol);
  if(currentCol!= 10 && currentCol!= 11 && currentCol!= 12)
  {
  var currentRow = r.getRow();
 // Browser.msgBox("currentRow:- "+currentRow);
  var v = parseInt(currentRow);
   var dataRange = doc.getRange(v, 10, 1,3);
  var data = dataRange.getValues();
   for (i in data) {
    var row = data[i];
    var tom = row[0].toLowerCase();  

   // Browser.msgBox(tom);
    var steven = row[1].toLowerCase();
    var lucy = row[2].toLowerCase();
    if(tom=="added" )
     doc.getRange(v, 10, 1, 1).setValue("ADD"); 
     if(steven=="added" )
     doc.getRange(v, 11, 1, 1).setValue("ADD"); 
      if(lucy=="added" )
     doc.getRange(v, 12, 1, 1).setValue("ADD"); 

   }

}
    // calscript();
   //Browser.msgBox("Done:-");
}


function calscript() {
  //Browser.msgBox("start calscript:-");
  var sheet = SpreadsheetApp.getActiveSheet();
  var startRow = 2;  // First row of data to process
  var numRows = 2;   // Number of rows to process
  var dataRange = sheet.getRange(startRow, 1, sheet.getMaxRows(),35);
  var data = dataRange.getValues();

  for (i in data) {
    var row = data[i];
    var title = row[32].toString();
    // Browser.msgBox(title);// First column
    var desc = row[34];       // Second column
    var tstart = row[2];
   // Browser.msgBox(tstart);// First column
    var tstop = row[3];
   // Browser.msgBox(tstop);// First column
    var loc = row[31];
    var tom=row[9].toLowerCase();
    var steven=row[10].toLowerCase();
    var lucy=row[11].toLowerCase();
    var day=row[4].toLowerCase();
    if(tom=="add")
    {
      AddtoTom(day,title, tstart, tstop, {description:desc,location:loc});
      dataRange.getCell(parseInt(i)+1,10).setValue('Added'); 
    }
    if(steven=="add")
    {
      AddtoSteven(day,title, tstart, tstop, {description:desc,location:loc});
      dataRange.getCell(parseInt(i)+1,11).setValue('Added'); 
    }
    if(lucy=="add")
    {
      AddtoLucy(day,title, tstart, tstop, {description:desc,location:loc});
      dataRange.getCell(parseInt(i)+1,12).setValue('Added'); 
    }
    //cal.createEvent(title, new Date("March 3, 2010 08:00:00"), new Date("March 3, 2010 09:00:00"), {description:desc,location:loc});
   // cal.createEvent(title, tstart, tstop, {description:desc,location:loc});
 }
}
function AddtoTom(day,title,startdt,enddt,desc)
{
   var cal = CalendarApp.openByName("Tom");
  if(day=="all day")
    **cal.createAllDayEvent(title, **startdt,** desc)**
  else
    cal.createEvent(title, startdt, enddt, desc);

}
function AddtoSteven(day,title,startdt,enddt,desc)
{
   var cal = CalendarApp.openByName("Steven");
 if(day=="all day")
    **cal.createAllDayEvent(title, **startdt**, desc)**
  else
    cal.createEvent(title, startdt, enddt, desc);

}
function AddtoLucy(day,title,startdt,enddt,desc)
{
   var cal = CalendarApp.openByName("Lucy");
 if(day=="all day")
    **cal.createAllDayEvent(title, **startdt**, desc)**
  else
    cal.createEvent(title, startdt, enddt, desc);

}

function onOpen() {
   //  Browser.msgBox('start');// First column
  var menuEntries = [];

  menuEntries.push({name: "Add To Calendar", functionName: "calscript"});
  ss.addMenu("Main Menu", menuEntries);
 // Browser.msgBox('end');// First column
}

function onInstall() {
  onOpen();
}

function onFormSubmit()
{

}
function configure() {
 // Browser.msgBox('trigger');// First column
  ScriptApp.newTrigger("calscript").timeBased().everyMinutes(1).create();
  //Browser.msgBox('trigger ends');// First column
}
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-08T10:14:16+00:00Added an answer on June 8, 2026 at 10:14 am

    OK i was being an idiot i think……. It turns out it wasn’t a really a script issue it was a daylight savings issue as the only results that were a day early appeared after the 1st April 2013 I had the timezone for my calenders, form/spreadsheet and script set to GMT+0000. I simply reset them all to ‘GMT+0000 no daylight savings’ and this seems to fix the issue. I recommend this to anybody having a similar date issue where the dates are pushed back a day or the times are pushed back an hour.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a curious issue here In my ejbCreate() method from where i insert
I'm having an issue here, I am trying to get all the titles from
http://jsfiddle.net/fSrBv/ I'm having an issue here where in my From field I'm able to
So I just changed the PageControl project from Apple's site here . The issue
I have a really weird issue here. I'm using my local development server right
Aside from scalability issues, has anyone here actually stumbled upon a web-development problem where
My issue here is quite simple : i'm trying to use the jQuery validate
Having an issue here that I have tried everything I can think of but
Im having a weird issue here. Its probably just something stupid but I dont
I am facing a issue here in reading the values set by a stored

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.