It's a tale of two time zones. On Tuesday, the last day of his visit to India, President Obama addressed a packed hall of students in the country's capital. He spoke passionately about the United States' and India's shared values of democracy and pluralism.

"In India and America, our diversity is our strength," Obama said. "India and the U.S. are not just natural partners. I believe America can be India’s best partner."

Hours later, Obama, alongside a venerable bipartisan delegation of top American politicians and diplomats, landed in Saudi Arabia to pay his respects to the late Saudi King Abdullah and meet the newly ascended King Salman. One of the first dramatic headlines there? Outrage on Saudi social media over the fact Michelle Obama did not wear a headscarf. There was no indication, meanwhile, that the visiting American dignitaries had any desire to confront the Saudis on their grim human rights record.

Earlier in the day, Obama had extolled India's extraordinary growth, its proud democratic tradition, and the vitality of its huge population of young people. But he tempered his remarks with statements that could be perceived as polite criticisms.

"Every person has the right to practice their religion and beliefs and not practice it if they choose so without any persecution," Obama said. "No society is immune from the darkest impulses of men and too often, religion has been used to tap into those instead of the light of God." Those comments were interpreted by some as a warning against sectarian impulses within Indian political life. The Hindu nationalist party of Prime Minister Narendra Modi holds a majority in parliament.

And Obama didn't just lecture on the need for tolerance of religious minorities. He spoke of the importance of women's rights in a country where shocking abuses still endure. "Every girl’s life matters. Every daughter deserves the same chance as our sons. Every woman should be able to go about her day...and be safe and be treated with the respect and dignity that she deserve," Obama said.

These are unobjectionable remarks, and a point of view shared by likely everyone who crowded in to hear the American president speak. But don't expect Obama to share the same message with the United States' Saudi partners, whose cooperation on matters of counterterrorism in the Middle East and energy policy are vital for Washington's interests.

"It’s not simply a matter of the United States telling other countries what they should do," said Ben Rhodes, deputy national security adviser, when asked why the same concerns articulated by Obama in Delhi had less priority in Riyadh.

Saudi Arabia is notorious both for its draconian religious laws and the lack of freedoms afforded to women in Saudi society. My colleague Adam Taylor earlier cited a chart that shows the alarming similarities between the ways the Saudis and the jihadists of the Islamic State administer justice. On the first day of King Salman's reign, a public beheading took place in the city of Jiddah.

Yet the kingdom remains a staunch American ally, favored by some U.S. politicians who otherwise champion American values and declaim the perfidy of tyrants elsewhere.

Speaking to CNN ahead of landing in Riyadh, Obama made clear the imperatives at play: "Sometimes we have to balance our need to speak to them about human rights issues with immediate concerns that we have in terms of countering terrorism or dealing with regional stability," he said.

Obama is hardly the first American president to be accused of foreign policy hypocrisy. And, indeed, there's nothing necessarily surprising about it. Obama has long espoused a more pragmatic approach on the international stage, with many critics wishing he had more of an ideological backbone.

But when you celebrate religious pluralism and women's rights in one country -- and then cut short your stay to visit another where both those things are conspicuously lacking -- it looks, at the very least, a bit awkward.

Read more WorldViews posts:

Saudi Arabia’s King Salman greeted then-President Obama as he arrived with then-first lady Michelle Obama in Saudi Arabia in January 2015. (Reuters)