StorageB / Google-Sheets-Logging

Log data from an ESP8266 device directly to Google Sheets without a third party service. Log sensor data, send data by pressing a button, and receive data from a Google spreadsheet. (NodeMCU, Wemos D1 mini, Adafruit Feather HUZZAH, etc)
145 stars 32 forks source link

Time Entry #15

Closed rammmaker closed 1 month ago

rammmaker commented 2 months ago

How to adjust time entry?

StorageB commented 2 months ago

In the GoogleScripts-example.gs file, lines 34-36 is where the time and date are being set and it tells you how to change the time zone:


// Default time zone is America/Chicago. Update time zone below with appropriate ID from here: https://developers.google.com/google-ads/api/data/codes-formats#timezone-ids
var date_now = Utilities.formatDate(new Date(), "America/Chicago", "yyyy/MM/dd"); // gets the current date
var time_now = Utilities.formatDate(new Date(), "America/Chicago", "hh:mm:ss a"); // gets the current time```
rammmaker commented 1 month ago

thanks! I am now able to adjust date and time.