Keeping times relative

i have a software that let’s the user change the time of the machine they’re working on. thing is, we have a logging system in the software, as well.

for example, let’s say the user makes some edits to their work. later on they find out that the time on the machine was a few hours off and they update the time.

i need those edits that they made in the incorrect time to be updated to be relative to the newly updated time.

what’s the best way to handle this?

What language(s) is all this written in?

Are the changes made on their own machine which is running as a server with PHP?

Where are permanent changes made?

a) file system (file make times change)
b) database entries (lastupdate style db fields change)