Fixed JSON datetime handling