A planned test of a sophisticated earthquake alert system that was supposed be sent late Thursday morning instead buzzed cellphones across the West Coast in the middle of the night, waking countless people from Los Angeles to Seattle.

The messages blared on phones at 3:19 a.m. Thursday, startling awake users of the MyShake app across California, Oregon and Washington precisely seven hours before the planned Great ShakeOut earthquake drill. The exercise, originally scheduled for 10:19 a.m., had aimed to prepare California and other areas of the nation for a large-scale rattler by encouraging people to “drop, cover and hold on.”

Robert de Groot, a member of the U.S. Geological Survey’s ShakeAlert operations team, emphasized that residents could continue to have faith in the ShakeAlert system. Though it ranks among the most sophisticated earthquake warning systems in the world, it also remains a work in progress, he said.“We learn something new from every opportunity to do something like this,” de Groot said. “Of course, today was a learning experience. Yesterday was a learning experience for us as well.”

State officials say the goal of the ShakeOut was to encourage people to practice earthquake safety and to remind residents to keep their emergency earthquake kits well stocked. About 10 million people were expected to participate throughout the state, including schoolchildren and many office workers.

A simple time zone mix-up was to blame for the erroneous early-morning test alerts, de Groot said.

The messages were delivered at 10:19 Coordinated Universal time, rather than Pacific time.

“It was just a simple twist in the code,” de Groot said. He added that the problem since has been corrected.

A previously scheduled alert for the correct time of 10:19 a.m. PDT was still sent as planned. However, some people who received the early-morning message did not get the second message later in the day.

Both the errant pre-dawn messages, as well as the 10:19 a.m. follow-up messages, were only sent to people who had downloaded the MyShake app and who had successfully installed the program on their phones. More than 1 million people across the West Coast have installed the app, though it’s unclear how many people have completed the setup process, de Groot said.

In the event of a real earthquake, additional messages also could be sent via other means, including through Google and through cell towers, similar to how Amber Alerts are issued. However, those extra messages depend on the severity of the quake. For example, warnings will only be sent over all platforms during a quake with a magnitude of 5.0 or greater.

The alerts came a day after the 34th anniversary of the 1989 Loma Prieta quake and marked the second straight day of unexpected warnings for people across the Bay Area and the Sacramento River delta after a 4.2 magnitude temblor struck Wednesday morning near the town of Isleton. The initial alert for that rattler suggested the quake was a magnitude 5.7 — 31 times stronger than the actual quake that struck.

The reasons for that incorrect reading were two-fold, de Groot said. And both relate to the location of underground sensors meant to detect the first stirrings of a quake.

Typically, notifications are based on the sensors’ measurement of the first wave to be released from an earthquake, otherwise known as a compressional, or “p,” wave. On Wednesday, however, a sensor was remarkably close to the earthquake’s epicenter — meaning it also appeared to pick up hints of the quake’s more powerful shear, or “s,” wave, skewing the sensors’ initial readings.

De Groot likened the phenomenon to the difference between observing lighting at different distances. From far away, a pause exists between a lighting bolt’s flash and the ensuing thunder. Yet when a bolt strikes nearby, thunder can rattle the air almost simultaneously.

“That’s kind of what happened in this event, is that the thunder and the lightning arrived at the same time,” de Groot said.

In addition, the quake took place in the Sacramento Delta — an area known for soft, waterlogged soils that can amplify shaking, even during a mild or moderate quake.

To download the app, go to myshake.berkeley.edu.