wrote a way for postgresql time ranges to encode themselves out as JSON