Hydrogen vs. Battery Electric Cars

About the refueling: Couldn't you plug your hydrogen car in at home to generate hydrogen out of water? Fuel cells work in both directions. It might take a lot of time but maybe it could be enough for getting to work everyday if you plug it in at home.