I'm trying to put in a timestamp function for tracking stuff in the API log, but it only works in the specific script I put it into, even though I thought all the scripts worked in the same scope. Never mind... figured out what I did wrong.     function displayTime() {         var str = "";         var currentTime = new Date();         var month = 1 + currentTime.getMonth();         var day = currentTime.getDate();         var year = currentTime.getFullYear();         var hours = currentTime.getHours();         var minutes = currentTime.getMinutes();         var seconds = currentTime.getSeconds();         if (month < 10) { month = "0" + month };         if (day < 10) { day = "0" + day };         if (minutes < 10) { minutes = "0" + minutes };         if (seconds < 10) { seconds = "0" + seconds };         str += year + "/" + month + "/" + day + " " + hours + ":" + minutes + ":" + seconds;         if (hours > 11) { str += " PM" }          else { str += " AM" }         return str;     }