fix retrieve date from localStorage