It should be fairly easy to modify INSERT database queries to check time before writing data.
Do you mean modifying the source code of the app or that INSERTS are accessible in a conf file or elsewhere.
Queries can be customised in the config file.
Is it possible to stop recording positions for a device at certain hours, I don't want to know (and for privacy I shouldn't) where are my workers out of working hours.