OK, as suspected, your loop() code is asymmetric.
Depending on the time function (and I do not know what status "RTC.read(tm)" actually returns), at the end of the loop you have turned one LED on and it stays on for any period of time until RTC.read(tm) returns TRUE.
It could arguably be suppressed by adding:
void loop() {
if (RTC.read(tm)) {
for (int i = 0; i < 4; i++) {
AmPm();
int x = bitRead(hora, i);
if (x == 1) {
LedHour(i);
}
else
Apagado();
}
for (int j = 0; j < 6; j++) {
byte z = bitRead(tm.Minute, j);
Apagado();
if (z == 1) {
ledOn(j);
} else {
Apagado();
}
}
}
Apagado();
}
But the general "messiness" in the code remains. You need a different approach.
There are two general approaches to Charlieplexing. The poorer one is to light just one LED at a time; this severely constrains the available brightness as for uniformity, you must allocate each LED the same time whether it is lit or not.
The better approach is to set up a matrix - an array of rows and columns - so that for each selected column, as many rows as need to be, are lit together. You need to be driving the rows only through the resistors as I illustrated and if you really wish to use the maximum driving current, the columns will need emitter follower transistors as in the reference I gave.
In your case, it will suffice that the resistors limit the current to 5 mA per LED so that the common line will draw no more than the rated 20 mA at any one time. The resistor will depend on your LED colour.
Now as to the code, it is also inefficient to light individual LEDs as steps within the Loop(). The correct approach is to use a timer (checking the millis() value) to periodically, as the loop() continues always to repeatedly cycle, step from one column to the next, switching off the outputs for the previous column, setting up the new row data and then switching on the new column.
Alternatively you need not use the timer if the remainder of the loop code is assured to take the same time on every cycle.
Also remember to use Ctrl-T on your code regularly to properly format it so you can see what is going on.