Problems with DS3231 day of the week chars

Hello, so I have been trying to make 8x32 LED clock. but now I am having some issues with DS3231 module’s DoW chars… module saves all data correctly I have no problems with time or date saving,but when it comes to day of week chars It shows the the day when code is uploaded and this char is changed… Most of my code is an example code from MaxMatrix library. I modified it to show time on my led display…So I want to ask for some help how to solve it. Please do nt take attension to comments, because they are in lithuanian.I have deleted Binary part due to too mane characters Here is the code:

// Pridedamos reikalingos bibliotekos norimam kodui
#include <MaxMatrix.h>        //8x8 LED matricų biblioteka
#include <avr/pgmspace.h>     
#include <DS3231.h>           // Laikrodžio modulio biblioteka
#include <Wire.h>

int data = 8;    // DIN jungtis nuo naudojamo modulio
int load = 9;    // CS jungtis nuo naudojamo modulio
int clock = 10;  // CLK  jungtis nuo naudojamo modulio

int maxInUse = 4;    // Nurodomas naudojamų 8x8 LED modulių numeris

MaxMatrix m(data, load, clock, maxInUse); // define module



byte buffer[10];

// Irašomas tekstas kuri norime matyti ekrane
char string[] = "HELLO      "; 
char space[] = "        ";
/*char string1[] = " A B C D E F G H I J K L M N O P Q R S T U V X W Y Z ";
char string2[] = " a b c d e f g h i j k l m n o p q r s t u v x w y z ";
char string3[] = " 1 2 3 4 5 6 7 8 9 0 - = ";
char string4[] = " ! @ # $ % ¨ & * ( ) _ + ";
char string5[] = " ' , . ; ~ ] ´ [ | < > : ^ } ` { / ?  ";
*/

// Visko nustatymas prieš naudojimą
void setup(){
  m.init(); // modulio nustatymas
  m.setIntensity(5); // taškinės matricos ryškumo nustatymas (0 - 15)
  Serial.begin(9600); // serial communication initialize
  rtc.begin(); // Laikrodzio pradžia
  printStringWithShift(string, 100); // Pradžioje vieną kartą parodomas "Demo 1.0" 
}
// nesibaigianti(amžinoji) funkcija
// irašytos komandos kartojasi be perstojo
void loop(){

 // Pakeisti i<=15 i i<=300, i<=15 kartojama kas puse minutės demonstracijos tikslais
for(int i = 0  ;  i <= 15 ; i++){
  
 if(i == 60 || i == 120 || i == 180 || i == 240){

     Debug();
  }
printString(rtc.getTimeStr(FORMAT_SHORT));  // Spausdinamas Laikas  ant LED ekrano.  "FORMAT_SHORT" - laiko spausdinimas Val:min , be jo spausdintų Val:min:sec 
Serial.print(rtc.getTimeStr(FORMAT_SHORT)); // Spausdinamas laikas arduino konsolėje.  "FORMAT_SHORT" - laiko spausdinimas Val:min , be jo spausdintų Val:min:sec 
Serial.print("         ");
delay(1000); // nustatomas atnaujinimo periodas nesibaigiančioje funcijoje... 1000 = 1sec
 // kas penkias minutes bus parodoma data ir savaitės diena
 
  if(i == 15){
  

    printStringWithShift(rtc.getDateStr(FORMAT_MIDDLEENDIAN), 50);
    Serial.print(rtc.getDateStr(FORMAT_MIDDLEENDIAN));
    Serial.print("     ");
    printStringWithShift(space, 50);
    printStringWithShift(rtc.getDOWStr(), 50);
    Serial.print(rtc.getDOWStr());
    Serial.print("     ");
    printStringWithShift(space, 50);
    Debug();
    i = 0;
    
  }

}

  // kitu norimu sakiniu spausdinumas slenkanciame tekste
 /*printStringWithShift(string1, 100);
 printStringWithShift(string2, 100);
 printStringWithShift(string3, 100);
 printStringWithShift(string4, 100);
 printStringWithShift(string5, 100);
*/
}
// Nuskaitomas duotas tekstas ir paverčiamas į bitus 
void printCharWithShift(char c, int shift_speed){
  if (c < 32) return;
  c -= 32;
  memcpy_P(buffer, CH + 7*c, 7);
  m.writeSprite(32, 0, buffer);
  m.setColumn(32 + buffer[0], 0);
  
  for (int i=0; i<buffer[0]+1; i++) 
  {
    delay(shift_speed);
    m.shiftLeft(false, false);
  }
}
// piešiami nuskaityti simboliai ant ekrano
void printStringWithShift(char* s, int shift_speed){
  while (*s != 0){
    printCharWithShift(*s, shift_speed);
    s++;
  }
}
// tiesiog nupiešiamas duotas tekstas ant ekrano. komanda naudojama laikrodžiui
void printString(char* s)
{
  int col = 0;
  while (*s != 0)
  {
    if (*s < 32) continue;
    char c = *s - 32;
    memcpy_P(buffer, CH + 7*c, 7);
    m.writeSprite(col, 0, buffer);
    m.setColumn(col + buffer[0], 0);
    col += buffer[0] + 1;
    s++;
  }

}
void Debug(){
  m.init(); // modulio nustatymas
  m.setIntensity(5); // taškinės matricos ryškumo nustatymas (0 - 15)
  Serial.begin(9600); // serial communication initialize
  rtc.begin(); // Laikrodzio pradžia
}

"when it comes to day of week chars It shows the the day when code is uploaded and this char is changed... "

Sorry, that is not clear. Please explain.

aarg:
"when it comes to day of week chars It shows the the day when code is uploaded and this char is changed... "

Sorry, that is not clear. Please explain.

I am making clock that is displaying time and after some time displays date and day of the week. So the main problem is that those commands in code updates date and hours and saves it in storage. So time and date is updating even when arduino is off, but day of the wek is not updating. So I need help to update days of the week on that display.

for(int i = 0  ;  i <= 15 ; i++){
  
 if(i == 60 || i == 120 || i == 180 || i == 240){

     Debug();
  }

What are the odds, with i ranging from 0 to 15, that i will equal 60, 120, 180, or 240?

Why are you f**king with the value of i in the body of that for loop?

and saves it in storage.

What part of the code, EXACTLY, does that?

We can’t see what you see on your display. We need some proof that the day of the week doesn’t update.

PaulS:

for(int i = 0  ;  i <= 15 ; i++){

if(i == 60 || i == 120 || i == 180 || i == 240){

Debug();
  }



What are the odds, with i ranging from 0 to 15, that i will equal 60, 120, 180, or 240?

Why are you f**king with the value of i in the body of that for loop?
What part of the code, EXACTLY, does that?

We can't see what you see on your display. We need some proof that the day of the week doesn't update.

so this part with those values is made fr full version of the clock. I am making a demo version for presentation that I will have to do. so for demonstraion purpose for(int i = 0  ;  i <= 15 ; i++)  this will repeat scrolling date and day of the week every 15 secs. And my full clocks version will have for(int i = 0  ;  i <= 300 ; i++)  every 5 mins scroll of data and day will be repeated…
but when I update my code for example I updated it today clock swwitched day to Thursday, it was Tuesday.
and void Debug repeats same stuff as setup does.because clock used to turn off after some time, so I have made this to prevent my display from shutting down.

How do you set the day of the week in the RTC?

aarg:
How do you set the day of the week in the RTC?

it was set in previuos code version and when I have deleted the setDOW when uploaded this code...