What to give
- Code that creates, stores, compares or displays dates: [paste]
- Language, framework and database: [e.g. Python with PostgreSQL, JavaScript with MySQL]
- Database column types: [e.g. DATETIME, TIMESTAMP WITH TIME ZONE, string]
- Where users and servers are: [e.g. server in UTC, users in India, UAE and the UK]
- The symptom: [e.g. orders placed after 11:30 pm appear in the next day's report]
Task
Find every date and time bug in the code and fix it.
Review checklist
- Timestamps stored in UTC, or with their offset, never as local time without a zone.
- Conversion to the user's zone only when displaying or reading user input.
- Day boundaries for reports and limits computed in the business time zone, not the server's.
- Date-only values, such as birthdays and due dates, kept as dates and never shifted by a zone.
- Scheduled jobs defined in a named zone where daylight saving applies, such as Europe/London.
- Parsing that names its format; no reliance on the default locale.
- Comparisons between values in the same zone and type.
- Zones that are not a whole hour from UTC, such as India at UTC+5:30, handled correctly.
Output format
- | File and line | Bug | Example of wrong result | Fix |
- Corrected code in one block per file.
- A migration note if stored data must be converted, with a backup step first.
- | Test case | Input | Expected result |, including 23:59 local time, a daylight saving change night and a leap day.
Guardrails
- Use the standard date library of the language; do not hand-roll offset arithmetic.
- Do not change stored data without a reversible migration.
- Say clearly when a fix changes how existing records will display.






