My apologies. I dug a little bit further and found the problem. I was calculating the time stamps wrong before sending them to the ownCloud server. I've fixed the problem and it is working correctly now.