The UTC range for 2030 starts at 1893456000 and ends at the exclusive boundary 1924992000. The year has 365 days.
Use the year as a half-open range
WHERE event_time >= 1893456000
AND event_time < 1924992000
The exclusive upper boundary is safer than “December 31 at 23:59:59.” It works whether the database stores whole seconds, milliseconds, or fractions of a second.
Month starts in UTC
| Month start | Unix seconds | ISO 8601 UTC |
|---|---|---|
| January 1 | 1893456000 | 2030-01-01T00:00:00Z |
| February 1 | 1896134400 | 2030-02-01T00:00:00Z |
| March 1 | 1898553600 | 2030-03-01T00:00:00Z |
| April 1 | 1901232000 | 2030-04-01T00:00:00Z |
| May 1 | 1903824000 | 2030-05-01T00:00:00Z |
| June 1 | 1906502400 | 2030-06-01T00:00:00Z |
| July 1 | 1909094400 | 2030-07-01T00:00:00Z |
| August 1 | 1911772800 | 2030-08-01T00:00:00Z |
| September 1 | 1914451200 | 2030-09-01T00:00:00Z |
| October 1 | 1917043200 | 2030-10-01T00:00:00Z |
| November 1 | 1919721600 | 2030-11-01T00:00:00Z |
| December 1 | 1922313600 | 2030-12-01T00:00:00Z |
Quarter boundaries
- Q1: 1893456000 (2030-01-01T00:00:00Z)
- Q2: 1901232000 (2030-04-01T00:00:00Z)
- Q3: 1909094400 (2030-07-01T00:00:00Z)
- Q4: 1917043200 (2030-10-01T00:00:00Z)
- Next year: 1924992000 (2031-01-01T00:00:00Z)
These are UTC values. A local business year begins at a different instant unless the business timezone is UTC; calculate those boundaries in the named location before storing the result.