Unfortunately, this nonsense isn’t a new Obama thing. It is longstanding policy
There was actually legislation, passed during the GW Bush administration, that required the USA to recognize Jerusalem as Israel’s capital, move the embassy etc. Bush made a “signing statement” that said he regarded the law as advice only, and kept on with business as usual.
Candidate Obama brazenly lied (to folks who wanted to be lied to) that he regarded Jerusalem as the “eternal undivided capital of Israel. Once in office, however, that notion was quickly discarded.
The law is Clinton era, and contains a waiver option.