EN

Work time tracking with smartphones — analysis with AI

Most people only use their smartphones to make calls or send messages, but these devices offer amazing technological possibilities that can make everyday life easier.

The iPhone is not just a status symbol, it is a multifunctional device. With a simple programming option, for example, you can automate your time tracking with GPS location and iCloud sync — and no longer have to keep records manually.

The system automatically detects when you arrive at work and when you leave, and records the data in a file stored on iCloud.

This can be useful for those who often forget to record their arrival and departure times, or simply don't want to spend time doing so. Additionally, with iCloud, all your data is synchronised, so you can access your recorded working time anywhere, anytime.

How does it work?

The program works through an application called Shortcuts, which allows you to perform various tasks automatically. 

The following script is an example of how we can automate time tracking based on GPS location.

Line by line explanation:

Set volume to 100% 

This step ensures that the phone's volume is at maximum so that loud feedback is heard.

Current Date 

The script records the time of the run, i.e. the exact date and time, which it later uses to record working hours.

Text ("I left the workplace") 

This step will record the message in a simple text field, which will be included in the record and feedback when you leave.

Add „Text” to „szöveg” 

The text is saved in a variable called "text", which is used when writing to the file.

iCloud Drive > Me-GPT + 

This step ensures that your data is stored in iCloud, so you can access your working time entries at any time.

Append „szöveg” to „File” (Munkaidő.txt) 

By this step, the program appends the content of the current variable to an existing "Worktime.txt" file stored in iCloud. Each new entry is recorded on a separate line.

Speak „Time” 

The program will announce the current time, confirming that the process has successfully recorded the data.

Speak („Távoztam a munkahelyemről”) 

Finally, the script will announce "I have left the workplace", so the user knows: the leaving time has been recorded.

In the Shortcuts application, select the blue "Automation" menu item in the bottom menu in the middle. Here you can set the program to automatically record the time when you arrive or leave work
Automatic run is set for the leaving event
Example of a text file in which dates and events are recorded

 

Get statistics with ChatGPT

The combination of smartphone and ChatGPT is a powerful tool for analysing time and attendance records. Whether based on data captured by an automatic iPhone script or manually maintained text files, you can have ChatGPT generate any statistics you need, saving you a lot of time and effort.

Once you have the text file, you don't even need to program to generate statistics: just give ChatGPT the right prompt. 

For example:

„today, 25.09.2024, how much time did I work?”

The answer: 

„Today, 25 September 2024, you worked a total of 6 hours and 40 minutes, according to the records.”

If we wonder how this value was obtained, we can enter another prompt: 

„show the analysis”. 

The answer: 

„In the analysis, I used the time sheet data to determine how much time you worked today. The data were as follows:    

1. 2024.09.25. 07:12 – You arrived for work
2. 2024.09.25. 09:20 – You left work
3. 2024.09.25. 12:13 – You arrived for work again
4. 2024.09.25. 16:45 – You left work again   

Steps: 

First phase:

Arrival: 07:12
Leaving: 09:20
Duration: 2 hours 8 minutes

Second phase:

Arrival: 12:13
Leaving: 16:45
Duration: 4 hours 32 minutes

Total working time: the combined duration of the first and second phase is 6 hours 40 minutes, which is your total working time for the day. You have therefore spent 6 hours 40 minutes working today.”