Use double instead of int, fix timestamps on iphone5 and older