logging - Wrong Time Zone in logs of Google Apps Scripts -


the time zone date() in script correct, cest (central european summer time). time zone reported view -> logs menu in script editor pdt (pacific daylight time)

that happens whatever standalone scripts , spreadsheets scripts.

this ad-hoc example code:

  logger.log(session.getactiveuserlocale());   logger.log(session.getscripttimezone());   var d = new date();   logger.log(d.tolocalestring()); 

[17-09-12 01:50:46:566 pdt] es

[17-09-12 01:50:46:567 pdt] europe/paris

[17-09-12 01:50:46:568 pdt] 12 de septiembre de 2017 10:50:46 cest

the time zone of system cest. time zone in google calendar , gmail of google account cest too.

any explanation?

p.s.

related not same issue theese questions:

the log & execution transcript seem use us/pdt, consistent google's home time-zone. however, if export logs times rendered in script time-zone. here's example script emails me execution log.

logs script editor view>logs

[17-09-12 18:28:40:915 pdt] export file created: '[redacted].csv' (id: [redacted]) [17-09-12 18:28:43:274 pdt] archive file created: '[redacted] - 20170913112841+1000 - export.csv' (id: [redacted]) ...etc, etc. 

same section of log emailed transcript:

wed sep 13 11:28:40 aest 2017 info: export file created: '[redacted].csv' (id: [redacted]) wed sep 13 11:28:43 aest 2017 info: archive file created: '[redacted] - 20170913112841+1000 - export.csv' (id: [redacted]) ...etc, etc. 

annoyingly, while exported logs in correct tz, they're in non-iso format google likes foist on us.


Comments

Popular posts from this blog

angular - Ionic slides - dynamically add slides before and after -

minify - Minimizing css files -

Add a dynamic header in angular 2 http provider -