Improved decode_posted_on function