Blog

Night shift attendance: which date does a punch after midnight belong to?

A night shift belongs to the date it started. If a worker punches in at 10:00 pm on 5 November and out at 6:00 am on 6 November, the whole shift counts on 5 November. India’s OSH Code says the same: hours worked after midnight are counted in the previous day (section 28). Attendance software must do this, or each night becomes two half days.

· Attendance · 4 min read · By the OTOMATE team

Why night shifts break simple attendance

Simple attendance software groups punches by calendar date. That works for a 9-to-6 shift. For a 10 pm to 6 am shift it goes wrong in three ways:

  • The 10 pm in punch lands on 5 November with no out, so 5 November shows a missing punch.
  • The 6 am out punch lands on 6 November with no in, so 6 November shows another missing punch.
  • If the worker is on a day shift the next day, the 6 am out and the 9 am in get paired, and the hours are nonsense.

The fix is to group punches by shift, not by calendar date.

The rule: a shift belongs to the day it started

Section 28 of the Occupational Safety, Health and Working Conditions Code, 2020 deals with shifts that run past midnight. For such a worker, the hours worked after midnight are counted in the previous day, and the next day is the 24 hours that begin when the shift ends. A weekly holiday is likewise 24 hours in a row starting when the shift ends.

PunchCalendar dateAttendance date
In, 10:02 pm5 November5 November
Out, 6:05 am6 November5 November
Hours worked–8 h 03 min on 5 November

Women may work night shifts too: the Code allows work before 6 am and after 7 pm with their consent, subject to the safety and other conditions in your state’s rules (section 43). Keep the written consent on file.

Rotating A/B/C shifts

Many factories and hospitals rotate three shifts, for example A 6 am–2 pm, B 2 pm–10 pm and C 10 pm–6 am, with each team moving to the next shift every week. Two things decide whether attendance stays clean.

1. The roster must be in the software

If the software does not know someone is on C this week, it cannot tell a 6 am out punch from a 6 am in punch. Enter the rotation once as a pattern with a start date, rather than changing each person’s shift by hand every Monday.

2. Leave a gap when the shift changes

A worker who ends C at 6 am and starts A at 6 am the same morning has no rest, and the software has no gap to split the two days. Put the weekly off at the change (C week, off day, then A week). It is better for the worker, and the punches separate cleanly.

WeekTeam 1Team 2Team 3
Week 1ABC
Week 2BCA
Week 3CAB

Setting it up in OTOMATE

  1. Create the shifts. A shift whose end time is at or before its start time runs past midnight, such as C from 22:00 to 06:00. Give each a code (A, B, C) and the grace, half-day and overtime rules.
  2. Create the rotation. A repeating pattern of up to 56 days, for example 21 days: 6 days A, 1 off, 6 days B, 1 off, 6 days C, 1 off. Days in the pattern can be off.
  3. Assign it. Give the pattern to each team with its own start date, up to 1,000 people at once. The roster grid shows everyone’s planned shift by day, and you can change a single day.
  4. Use nearest shift for floaters. For people who switch shifts at short notice, “nearest shift” picks the shift closest to their first punch that day.

OTOMATE gives each day a window around its shift. The boundary between two days sits before the next shift’s start, by half the gap between the shifts, up to four hours. A 22:00–06:00 night followed by a 09:00 shift has its boundary at 07:30, so the 06:05 out punch stays with the night that started the evening before. Repeat punches within a minute are ignored.

If someone forgets to punch out, the day is flagged as a missing punch. HR can add the out punch on the next morning, with a reason, or the worker can send a missed-punch request from the app. Overtime after a night shift is worked out against that shift. See shifts and rosters.

Sources

  1. The Occupational Safety, Health and Working Conditions Code, 2020 (Act 37 of 2020) · Ministry of Labour and Employment
  2. Government makes the four Labour Codes effective (21 November 2025) · Press Information Bureau

Questions people ask

Something else? Call +91 90536 35607 or write to hello@otomateworld.com.

Which date does a night shift belong to?

The date the shift started. Under section 28 of the OSH Code, 2020, hours worked after midnight are counted in the previous day.

How are hours counted for a 10 pm to 6 am shift?

From the in punch to the out punch, across midnight, less any break you deduct. In at 10:02 pm and out at 6:05 am is 8 hours 3 minutes on the starting date.

What if a night-shift worker forgets to punch out?

The day shows a missing punch. Add the out punch on the next morning with a reason, or approve the worker’s missed-punch request. OTOMATE lets HR add a punch on the next day for night shifts.

Can women work night shifts in India?

Yes. Section 43 of the OSH Code allows women to work before 6 am and after 7 pm with their consent, subject to the safety and other conditions set by the appropriate government.

How do I set up rotating A/B/C shifts?

Create the three shifts, build a repeating pattern with off days at each change, and assign it to each team with its own start date. OTOMATE supports patterns of up to 56 days.

See it on your own machines

Book a free demo. We connect one of your machines with you on a call, and you watch your own staff’s punches arrive.