get_systime will return the current Unix Epoch value. You are then subtracting a week, so it is expected to get a value in the past. Based on what you have provided, it looks like it is trying to remove old data that hasn't been updated in a week.
I do not browse the forums regularly anymore. If you need me for anything (asking questions or anything else), then PM me (be descriptive in your PM, message containing only a link to a thread will be ignored).