fixed bugs when parsing certain time ranges