Device Independent TimeCapture

At times we find that the app needs to capture the time input by the user ( typically timesheet apps) but since the user’s device has different time setting ( I mean time zone ) or even if the users are in the same time zone, their device time settings could be leading or lagging the actual time. This may result in not actual time being recorded in the app.

The sample below is an attempt at capturing the “device independent” time in the app.

The important things to note are

  1. There are a series of actions bundeled into a group action.The actions essentially capture the Goggle sheet’s NOW()function rather than app’s NOW() function. So it essentially seprates the time capture from the device time.

However, since the Google Sheet’s NOW() function is volatile and changes the value on every edit of the sheet, the app captures this Google sheet’s NOW() ( Column name [G Sheet Time]) and copies it into another spreadsheet column [GSheet Time 2] through the app’s action, thereby making it a static value. This [GSheet Time 2] is used as the column to understand the device independent time that is outside user’s editable columns.

  1. The [Device Time] is captured through App’s NOW() function. The app then displays two time values along with time zone for that record to demonstrate that the Google Sheet time sticks to GMT time zone ,irrespective of the device time.

  2. I tested with 4 different devices with 4 different time zones set in them.

  3. In highlighted records in the picture below, I even manipulated the device time by advancing it by 5 minutes and one hour but the Gsheet time remained at GMT

  4. I had set the spreadsheet’s locale to GMT

I must mention that a very extensive testing remains. Also I believe this app will require online operation tocapture the correct time. I will request comunity collegaues to copy and test and please update with their findings whether the concept looks good, practical with any possible flaws.
Also,since the app captures the time columns through various actions, I believe there will be inherent difference of a few seconds between times. But I believe it should be acceptable for most practical needs.

The app name is " Device Independent Time Capture" at SG Portfolio

2 Likes

Very helpful, thanks.

1 Like