Skip to content

Google Apps Script returns wrong timezone

My google Apps Script script returned a wrong timezone with Date(). What I expect is GMT+8 (because I live in Asia) but the script timezone returns GMT-5. Even the log time is not match. Code: How can I change it from GMT-5 to GMT+8? Any help would be highly appreciated! Answer You can change the timezone of …

How can you serve a folder of files with Nginx?

I’m trying to serve a folder that contains HTML, JS, PHP, Java, and a couple of other different file types with Ngnix. I plan to then import two JS files from that folder into my index.html like so : The problem is, I am getting a 404 Not Found error : Below is my nginx.conf file. Any help would be

Svelte – how to make data not reactive?

I have some HTML elements that have a property color. The value of color will change over time. And I will add more of these label elements in future, but I wish only new elements inherit the new value – effectively, I wish to disable reactivity for this variable. Is this possible in Svelte? Answer Crea…

Reusable Alpine.js components?

How do I use Alpine.js to create a reusable component and display it? E.g., maybe I want to define an generic Alpine.js button component that changes text and color from parameters, then have my Alpine.js navbar component use the button component to show a login button. Can I do this in pure client-side code,…