<p>The apostrophe or single quote character is officially used to indicate minutes, if there are two, this indicates seconds (but, in the image from the question, the double quote cannot be seen).</p>
<p>Replacing the single quote for a decimal isn't a good idea to display the time as the following number is in seconds, not a fraction of a minute.</p>
<p>Either way, the remaining time is converted from a number into a human readable format by the <a href="https://github.com/MarlinFirmware/Marlin/blob/0a3c42a87c24ff3b5b184f211d5b2549083b61a5/Marlin/src/libs/duration_t.h#L156" rel="nofollow noreferrer">toDigital()</a> function of the <code>duration_t.h</code> file (referring to the Marlin 2.1 bugfix branch). Even with little programming skills if is easy to find where and what you want to change ( hint, see comment: <code>// 12'34</code>), the function is quoted for reference below:</p>
<pre><code>uint8_t toDigital(char *buffer, bool with_days=false) const {
    const uint16_t h = uint16_t(this-&gt;hour()),
                   m = uint16_t(this-&gt;minute() % 60UL);
    if (with_days) {
      const uint16_t d = this-&gt;day();
      sprintf_P(buffer, PSTR(&quot;%hud %02hu:%02hu&quot;), d, h % 24, m);  // 1d 23:45
      return d &gt;= 10 ? 9 : 8;
    }
    else if (!h) {
      const uint16_t s = uint16_t(this-&gt;second() % 60UL);
      sprintf_P(buffer, PSTR(&quot;%02hu'%02hu&quot;), m, s);     // 12'34
      return 5;
    }
    else if (h &lt; 100) {
      sprintf_P(buffer, PSTR(&quot;%02hu:%02hu&quot;), h, m);     // 12:34
      return 5;
    }
    else {
      sprintf_P(buffer, PSTR(&quot;%hu:%02hu&quot;), h, m);       // 123:45
      return 6;
    }
  }
</code></pre>

CC BY-SA 4.0
2022-06-17T07:06:16.797Z
2022-06-18T13:43:53.043Z
2022-06-18T13:43:53.043Z
0scar
<p>How can I replace the line in the time display with a dot? Using Marlin 2.1</p>
<p><a href="https://i.sstatic.net/9RZdk.jpg" rel="nofollow noreferrer" title="Photo of LCD display of a 3D printer with the time circled"><img src="https://i.sstatic.net/9RZdk.jpg" alt="Photo of LCD display of a 3D printer with the time circled" title="Photo of LCD display of a 3D printer with the time circled" /></a></p>

<marlin><firmware>
How to change the time format on LCD screen in Marlin 2.1?
ibrahim şahin
# How to change the time format on LCD screen in Marlin 2.1?

(Asked by: username_0 on 2022-06-15)

How can I replace the line in the time display with a dot? Using Marlin 2.1

[![Photo of LCD display of a 3D printer with the time circled](https://i.sstatic.net/9RZdk.jpg "Photo of LCD display of a 3D printer with the time circled")](https://i.sstatic.net/9RZdk.jpg "Photo of LCD display of a 3D printer with the time circled")

**Tags:** marlin, firmware

---

## 1 answers

### Answer by username_1 on 2022-06-17. Score: 1 | Accepted answer

The apostrophe or single quote character is officially used to indicate minutes, if there are two, this indicates seconds (but, in the image from the question, the double quote cannot be seen).
Replacing the single quote for a decimal isn't a good idea to display the time as the following number is in seconds, not a fraction of a minute.
Either way, the remaining time is converted from a number into a human readable format by the toDigital() function of the duration_t.h file (referring to the Marlin 2.1 bugfix branch). Even with little programming skills if is easy to find where and what you want to change ( hint, see comment: // 12'34), the function is quoted for reference below:
uint8_t toDigital(char *buffer, bool with_days=false) const {
    const uint16_t h = uint16_t(this->hour()),
                   m = uint16_t(this->minute() % 60UL);
    if (with_days) {
      const uint16_t d = this->day();
      sprintf_P(buffer, PSTR("%hud %02hu:%02hu"), d, h % 24, m);  // 1d 23:45
      return d >= 10 ? 9 : 8;
    }
    else if (!h) {
      const uint16_t s = uint16_t(this->second() % 60UL);
      sprintf_P(buffer, PSTR("%02hu'%02hu"), m, s);     // 12'34
      return 5;
    }
    else if (h < 100) {
      sprintf_P(buffer, PSTR("%02hu:%02hu"), h, m);     // 12:34
      return 5;
    }
    else {
      sprintf_P(buffer, PSTR("%hu:%02hu"), h, m);       // 123:45
      return 6;
    }
  }


---

