US President Joe Biden has endorsed an Israeli proposal for a ceasefire in Gaza, saying it's time for the war to end.