Logical Midnight Default Calculations and Validations
The Logical Midnight value has planned usage by Factory Track to support future enhancements for time threshold on attendance and jobs. In preparation for this support, this field is added to the Shifts form. The logic for the Data Sync Controls processing for this value is:
- If a value has been defined, the current value is validated to ensure that the current Logical Midnight is still outside of the updated day’s on-shift hours. If not, a staged “Shifts” record type with a Post Status of “Finished with Errors” is captured. The “Logical Midnight must be outside of normal on-shift hours” error is displayed.
- If value is not yet defined, Factory Track defaults the value based on these
calculations:
- Earliest Start: The earliest shift start time on any of the shift days that are not midnight-to-midnight configurations
- Latest End: The latest shift end time on any of the shift days that are not midnight-to-midnight configurations
- Time Difference: Amount of time from the Earliest Start times to the Latest End times
- Default Logical Midnight = (Time Difference / 2) + Earliest Start + 12 hours. For
example
- Earliest Start = 7:00am
- Latest End = 4:00pm
- Time Difference = from 4:00pm to 7:00am = 9.0 hours
- Default Logical Midnight = (9.0/2) + 7:00am = 11.30 AM (+ 12 hours) = 11:30 PM
- User can override this default value with 12-hour (with AM / PM designation) or 24-hour
format. When navigating out of this field, Factory Track validates these conditions and
display appropriate errors::
- Is blank: Logical Midnight is a required field
- Is not valid time: Logical Midnight entry is invalid
- Is within any day’s on-shift hours: Logical Midnight must be outside of normal on-shift hours
Note: Factory Track translates the valid entries to
display in the {hh:mm:ss xm} format.