When Dan Zigmond, director of analytics at Facebook, rolls into his office at 1 Hacker Way, he grabs a bowl of oatmeal topped with Greek yogurt and dried cranberries.

Later, he gets lunch from the company's drool-worthy cafeteria. He also eats dinner there. His coworkers might never suspect Zigmond subscribes to a trending diet called intermittent fasting, which involves going without food for anywhere from 14 hours to several days.

"Lots of us are eating at work or on the run. It's kind of hard to control what you eat these days," Zigmond tells Business Insider, rattling off the extreme diets his friends have tried and abandoned. "But one thing that basically everyone can control is time."

Dan Zigmond, author of "Buddha's Diet." Courtesy of Dan Zigmond In 2014, Zigmond began a brief stint working at food startup Hampton Creek, where he was surrounded by food scientists, plant biologists, and chefs. They talked about their food choices constantly and shared research around healthy living.

A paper from the Salk Institute for Biological Studies eventually crossed his desk. It suggested that when you eat might matter as much as what you eat. Mice whose eating was restricted to certain hours of the day became thinner than mice who fed whenever, according to the study.

Zigmond — who counts Microsoft, Google, and YouTube among his past employers — was immediately reminded of his time living in a Buddhist temple in Thailand years ago. The monks followed a similar routine. So, he decided to give it a go.

"It took me a couple of weeks. I remember at the end of each day, I would text a friend and say how many hours I'd eaten that day," Zigmond says. "But I got pretty quickly to this nine-hour diet. I just loved it. I almost immediately felt better. And I started losing weight."

He dropped more than 20 pounds in less than a year.

Zigmond, a father and a practicing Buddhist, says he wakes up feeling refreshed and never goes to bed hungry. He can't remember the last time he felt a "food coma" coming on.

"I roughly eat from nine to six. For some people, that wouldn't be the right schedule," Zigmond says. "The worst thing you can do for your body is eating at all hours."

The science behind intermittent fasting is spotty. Most studies use rodents and fruit flies as test subjects, rather than primates and people, Scientific American reports.

A member of the WeFast group slurps up egg yolks at a recent group breakfast. Melia Robinson

Still, intermittent fasting is catching on among certain Silicon Valley tech workers who give up food in order to increase focus and productivity and promote longevity. A club of San Francisco-based biohackers called WeFast meets for breakfast every Wednesday to commiserate with one another, share hacks, and — importantly — break the fast.

Most of Zigmond's coworkers at Facebook didn't know about his fasting until he announced his book, "Buddha's Diet: The Ancient Art of Losing Weight Without Losing Your Mind," now available for pre-order. It's co-written with Tara Cottrell, a friend and one of his first converts.

He doesn't catch flak from his colleagues or think there's anything weird about the way he eats. Because that's exactly what he does — eat.

Zigmond recalls when he was hired and received his welcome-email from Facebook.

"They have this email that goes [on] about where to show up and what to wear, and it says that they want you to be your authentic self. I think that they really believe that," he says.