Skip to main content

Why did the same two events count as June on one clock and July on another?

Midnight reaches Los Angeles hours after it reaches New York. If you are counting events by day, an event late on June 30 in Los Angeles can already belong to July 1 somewhere else. The event happens at the same instant in both places. Each city’s clock gives that instant its own date.

We made up two events that fell on June 30 in Los Angeles and saved their exact times. We then saved another version without the name of the city’s timezone. When our software reopened that version, it counted both events on July 1. It had used Coordinated Universal Time (UTC), the shared time standard, to decide which day they belonged to.

In the table, “Arrow schema” means the description saved alongside the data. It includes the city’s timezone in our test. With New York named, the software counted one event on each day. With Los Angeles named, it counted both on June 30. The last row shows what PyArrow, the software we used, counted after we left that description out and it read the times in UTC.

Daily totals for the same two events, using three different clocks
Timezone used for the decoded eventsEvents on June 30, 2025Events on July 1, 2025
New York, Arrow schema retained11
Los Angeles, Arrow schema retained20
UTC, as read by PyArrow without the Arrow schema02

We saved the events with PyArrow in a format for tables called Parquet. In these files, each timestamp represented a precise moment in UTC. The name of the city’s timezone lived in the separate Arrow schema. That name told PyArrow which local calendar to use when it grouped the events.

We wrote one version with the timezone America/New_York and another with America/Los_Angeles, then repeated both exports without the schema. How Parquet stores timestamps · What PyArrow can save with a table

When we left the schema out, the New York and Los Angeles files were identical down to the last byte. The timestamp values, measured in microseconds, still identified the same two moments in every run.

PyArrow 26.0.1 read the files without the schema in UTC. We could give it the missing instruction separately. When we told it to use New York time before grouping, the original New York count returned, one event on each day.

If a report needs Los Angeles dates, keep that timezone with the timestamps. After reopening an export, check where an event near midnight lands. That tests the daily count you actually use. Here we checked two invented events with one tool for writing and reading the files.