The date function does use the server time.
Is this a local server, or are you hosting this somewhere?
Is the time always off? If you echo out the exact time with a script, is for sure incorrect time?
Maybe what you could do is this:
Echo out the exact time of the server, and at the same time take note of your local time.
Find out the difference between the two, and then just write in your function to add/subtract the difference to the server time before you write it to your database.
Kind of a cheesy way to do it, but it would work.