fix firefox datetime bug