presto-main/src/main/java/io/prestosql/operator/scalar/DateTimeFunctions.java/DateTimeFunctions/secondFromTime
class DateTimeFunctions:    @Description("second of the minute of the given time")
    @ScalarFunction("second")
    @SqlType(StandardTypes.BIGINT)
    public static long secondFromTime(@SqlType(StandardTypes.TIME) long time)
    {
        // No need to check isLegacyTimestamp:
        // * Under legacy semantics, the session zone matters. But a zone always has offset of whole minutes.
        // * Under new semantics, time is agnostic to the session zone.
        return SECOND_OF_MINUTE.get(time);
    }