Some scripts, such as declare.py, may provide dates and not datetimes. This update make the declare_version work for both.