public static function secondsSinceMidnightStr($time)
    {
        $time_a = explode(':', $time);

        switch (count($time_a)) {
            case 0:
            case 1:
                return null;

            case 2:
                // Add seconds
                $time_a[] = 0;
                break;

            case 3:
                break;

            default:
                return null;
        }

        return self::secondsSinceMidnight((int) $time_a[0], (int) $time_a[1], (int) $time_a[2]);
    }