lojix/power_model/src/main/com/thesett/aima/attribute/time/TimeUtils.java
public static long ticksWithSecondsSetTo(long ticks, int seconds)
    {
        long oldSeconds = ticksToSeconds(ticks);

        return ticks - (oldSeconds * MILLIS_PER_SECOND) + (seconds * MILLIS_PER_SECOND);
    }
public static long ticksWithSecondsSetTo(long ticks, int seconds)
    {
        long oldSeconds = ticksToSeconds(ticks);

        return ticks - (oldSeconds * MILLIS_PER_SECOND) + (seconds * MILLIS_PER_SECOND);
    }
Sets the seconds component of the timestamp, returning the new timestamp with updated component.

@param  ticks   The time in ticks.
@param  seconds The new seconds field.

@return The new time in ticks.