TWO SHEET TIMEZONES

Learn how to manage two different time zones in your Google Sheets, ensuring your app scripts function correctly by setting the appropriate time zone in both spreadsheet and project settings.

This is a really really important thing. There are two time zones in your spreadsheet . You can go to file and you can go to settings and you can see that there's a local and then there's also a time zone and you can set this time zone to whatever you want. Usually you're going to put it in the time zone that you are in and you're going to save and reload. But there is another time zone . So basically if you are using any kind of app script or anything over an extensions app script and yes I know there's no function now. You should probably learn a function or two. Check out spreadsheet automation 101 over on better and learn how to code a little bit. But if you are already coding and you want to know why your time zone is messing up, this is probably why. Over here on the left side, go to project settings and here is another time zone. So this time zone you also have to set.

And we're going to set that. And just by setting it, it's going to save it. That's the most interesting thing is that you just have to set it to the proper time zone that you want for all of your app scripts. And this affects new date. This is the timestamp kind of setting function . So we can say variable today equals or time stamp equals new date. This new this is definitely going to be affected by that time zone . However, you can get around this by doing utilities format date and set this date. And here's time zone . So you can set the time zone here. And we can get the time zone of the active spreadsheet. Spreadsheet app.get active spreadsheet get spreadsheet time zone. And there

we're setting the time zone of that date. And also we can set you know the date or however format you want month minute day whatever you want here. But yeah that's how you get the spreadsheet time zone to be your actual time zone in your app script. but also you can update this in project settings. Hopefully you enjoyed this and got a little bit more knowledge about your spreadsheets. You're watching Better Sheets here on YouTube. Make sure you check out this video or this video and subscribe right now to get more tips, tricks, how-tos, get more out of your Google Sheets than you ever have before. I'm excited to be making a ton more videos here. Ask me questions down in the comments and I will answer them in future videos. But

for right now, right here, one of these videos is going to be your next Google Sheet.