in reply to epoch time from time()

Could the difference be 3600? That's one hour. I'm guessing you have two systems and the time zone info is wrong on one of them.

Your node is unreadable. Please use <p> at the start of every paragraph and <c>...</c> around code and preformatted data.