# Timestamp with your local time NOT user's time zone

**URL:** <https://community.glideapps.com/t/timestamp-with-your-local-time-not-users-time-zone/24753>\
**Category:** Community Resources\
**Created:** [March 26, 2021, 10:13am UTC](https://community.glideapps.com/t/timestamp-with-your-local-time-not-users-time-zone/24753 "2021-03-26T10:13:59Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![Simon\_Hill](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/simon_hill/32/94730_2.png) [@Simon\_Hill](https://community.glideapps.com/u/Simon_Hill)\
**Post date:** [March 26, 2021, 10:13am UTC](https://community.glideapps.com/t/timestamp-with-your-local-time-not-users-time-zone/24753/1 "2021-03-26T10:13:59Z")

</div>

Happy to share a trick if you want to track activity in your App, e.g. how many users are active in the last X hours then how many the last Y minutes.

This solves the issue that when you push the current time into a cell using a ‘Set columns’ action Glide pushes the current time on the user’s device versus your Local time. This can throw up issues, for example it may appear that users in Asia are active on the App in the future!

So my solution is to leverage your Google sheet. The magic is to insert a formula with a circular reference. By default, your Sheet will give you an error #REF. However, if you go to your file settings and switch on ‘Iterative calculations’, the sheet will allow the formula to run X times (set X to 1). Moreover, it will run every time anything in your Sheet changes - a kind of dynamic timestamp. The video shows the formula I used.

I used the formula and added a set column that simply increments a counter in my Google sheet, i.e. changes something and triggers the Timestamp update. Now, instead of setting a column with ‘Current time’, instead I set it using my new dynamic Timestamp value.

[![](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/3X/c/f/cfb32b2aa4a68a760be33d7d8edad979bde89322.jpeg "TimeStamp - Glide") ](https://www.youtube.com/watch?v=pqc-XB96I3I)

\*One caution, since the Google sheet updates a second or two after you set a column (e.g. the counter) then the Timestamp will also have a couple of seconds of delay.

---

<div class="post-metadata">

**Author:** ![Darren\_Murphy](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/darren_murphy/32/47326_2.png) [@Darren\_Murphy](https://community.glideapps.com/u/Darren_Murphy)\
**Post date:** [March 26, 2021, 10:35am UTC](https://community.glideapps.com/t/timestamp-with-your-local-time-not-users-time-zone/24753/2 "2021-03-26T10:35:06Z")

</div>

Nice job!

I still think there will be a way to do it in Glide, but I will admit I spent a while on it yesterday and drew a blank. Maybe @Jeff_Hager might be able to come up with some magic…

PS.

> [@Simon\_Hill](#):
>
> This can throw up issues, for example it may appear that users in Asia are active on the App in the future!

That of course is all relative. For some of us, users in the UK are living in the past 😛

---

<div class="post-metadata">

**Author:** ![Jeff\_Hager](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/jeff_hager/32/43_2.png) [@Jeff\_Hager](https://community.glideapps.com/u/Jeff_Hager)\
**Post date:** [March 26, 2021, 12:22pm UTC](https://community.glideapps.com/t/timestamp-with-your-local-time-not-users-time-zone/24753/4 "2021-03-26T12:22:00Z")

</div>

That’s the best solution I’ve seen short of a script.

I’ve thought about this before, but it always came down to needing a known timestamp, such as GMT, thats recorded at the same time as a timestamp from the user’s device.

I got to ask though, does that timestamp change when you make a change in any row, or only when you change that specific row? Say you have 4 rows each changed by different users in different timezones. Would the formula cause the time to update in all rows when the sheet changes, or does the time only update in the row that was changed?

---

<div class="post-metadata">

**Author:** ![Darren\_Murphy](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/darren_murphy/32/47326_2.png) [@Darren\_Murphy](https://community.glideapps.com/u/Darren_Murphy)\
**Post date:** [March 26, 2021, 12:29pm UTC](https://community.glideapps.com/t/timestamp-with-your-local-time-not-users-time-zone/24753/5 "2021-03-26T12:29:02Z")

</div>

> [@Jeff\_Hager](#):
>
> I got to ask though, does that timestamp change when you make a change in any row, or only when you change that specific row? Say you have 4 rows each changed by different users in different timezones. Would the formula cause the time to update in all rows when the sheet changes, or does the time only update in the row that was changed?

NOW() is one of a few GSheets functions that’s considered “volatile”, meaning that it recalculates with _every_ edit, anywhere in the sheet.

> **[NOW - Google Docs Editors Help](https://support.google.com/docs/answer/3092981?hl=en)**
>
> Returns the current date and time as a date value. Sample Usage NOW() Syntax NOW() Notes Note that NOW is a volatile function, updating on every edit made to the spreadsheet, and can hur

For that reason, it’s generally advised to use with caution. But this case is fine, as it’s just a single cell.

---

<div class="post-metadata">

**Author:** ![Wiz.Wazeer](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/wiz.wazeer/32/72423_2.png) [@Wiz.Wazeer](https://community.glideapps.com/u/Wiz.Wazeer)\
**Post date:** [March 26, 2021, 12:32pm UTC](https://community.glideapps.com/t/timestamp-with-your-local-time-not-users-time-zone/24753/6 "2021-03-26T12:32:09Z")

</div>

I had to withdraw my post when I realised me in UK you too. 🤩

---

<div class="post-metadata">

**Author:** ![Simon\_Hill](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/simon_hill/32/94730_2.png) [@Simon\_Hill](https://community.glideapps.com/u/Simon_Hill)\
**Post date:** [March 26, 2021, 12:44pm UTC](https://community.glideapps.com/t/timestamp-with-your-local-time-not-users-time-zone/24753/7 "2021-03-26T12:44:41Z")

</div>

Yep, works with any cell, any row!

---

<div class="post-metadata">

**Author:** ![christoph](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/christoph/32/22794_2.png) [@christoph](https://community.glideapps.com/u/christoph)\
**Post date:** [May 21, 2021, 11:13am UTC](https://community.glideapps.com/t/timestamp-with-your-local-time-not-users-time-zone/24753/8 "2021-05-21T11:13:42Z")

</div>

@Simon_Hill, that’s a cool trick!  
Did I understand this correctly: the formula updates if there is a change in that sheet where the formula sits or in any sheet of google document.  
What do you mean with “added a set column that simply increments a counter”?  
Are you incrementing the counter with a script function or somehow from Glide?  
Thank you

---

<div class="post-metadata">

**Author:** ![Simon\_Hill](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/simon_hill/32/94730_2.png) [@Simon\_Hill](https://community.glideapps.com/u/Simon_Hill)\
**Post date:** [May 21, 2021, 3:31pm UTC](https://community.glideapps.com/t/timestamp-with-your-local-time-not-users-time-zone/24753/9 "2021-05-21T15:31:57Z")

</div>

Hi Christoph,

Thanks… it is quite a cool trick. The formula updates for any change anywhere in the google document (any tab, any sheet).

Re: What do you mean with “added a set column”…

I picked a few strategic places in my App (trip wires) where I could add a step to a custom action (in Glide), namely ‘Set column’. For example, if there was a button or a form then I would extend the custom action with a ‘set column’. You basically want to update something in your Google sheet to trigger the formula change. The set-column was simply setting the current date into a redundant cell in the sheet (Users). This change in turn triggers the formula update.

Originally, I started out with an increment action, but switched to using a set column. Apologies for the confusion.

Hope this helps.
