Day 4 was fun, a bit of a step up from previous days 🙂
My solution is here: https://gitlab.com/abowes/adventofcode2018/blob/master/src/main/kotlin/jfactory/day04/NightShift.kt
I sorted the input lines before attempting to parse the file as the yyyy-mm-dd hh:mm ensures that they will be sequential. Each input line converted to an Action and then List of Actions converted to SleepPeriods.
I was expecting Part 2 to be tougher than it was.