This can really be another very complicated issue to manage and define, since you can be connected to a PC for many reasons, beyond strictly professional use, there are tools like Timenet that can facilitate and completely solve this type of problem, since you can record when the working day begins and ends, regardless of whether or not you are connected to the computer.
All these issues are a consequence of teleworking, a practice that is here to stay, although being so new in our country and in our labor market, it presents many controversies that need to be resolved, some through the courts. Precisely to be able to clarify how teleworking should be done, the government is preparing a new Law that will regulate all aspects of working from home that are currently poorly defined.
In any case, it is completely advisable to have systems like timenet that allow you to record both the working day and the projects in which you telework, complying with the Law to the letter. It is an online application, easy and inexpensive, that does not require installing any software, and that is accessible from any place and device that has an Internet connection.