fixed datetime issue and json gettin'