Skip to content

How to Change the Date and Time Format in Centova Cast (24-Hour Clock)

Updated 5 min read

Updated: 8 October 2026 · Applies to: Centova Cast v3 (current release 3.3.4), settings according to Centova; format letters tested with PHP 8.4 and gettext 0.23 on Debian 13

Yes. Centova Cast shows dates like Mar 09, 2026 and times like 02:05 PM by default, but you can change both. Edit four strings in your locale's common.po file (_DATEFORMAT, _TIMEFORMAT, _NODAYFORMAT and _NOYEARFORMAT), or set one format for the whole server with the OVERRIDE_ options in centovacast.conf. For a 24-hour clock, set the time format to H:i. Both methods need root access to the Centova Cast server over SSH.

The four format strings

Centova's language template defines these strings and defaults:

  • _DATEFORMAT: the full date, default M d, Y (Mar 09, 2026)
  • _TIMEFORMAT: the time, default h:i A (02:05 PM)
  • _NODAYFORMAT: month and year only, default M, Y (Mar, 2026)
  • _NOYEARFORMAT: day and month only, default M d (Mar 09)

The values use PHP date format letters, and Centova's documentation refers to the PHP date format reference for the full list. The ones you need most are d (day, two digits), j (day without a leading zero), m (month number), M (short month name), F (full month name), Y (year), H (hour, 24-hour clock), h (hour, 12-hour clock), i (minutes) and A (AM or PM). This is what PHP 8.4 printed for 9 March 2026 at 14:05:

M d, Y     => Mar 09, 2026
h:i A      => 02:05 PM
d M Y      => 09 Mar 2026
j F Y      => 9 March 2026
d/m/Y      => 09/03/2026
d.m.Y      => 09.03.2026
Y-m-d      => 2026-03-09
H:i        => 14:05

Option 1: change the format of one locale

Use this when your stations use a translated locale, so each language keeps its own formats.

  1. Log in to the server as root over SSH and check the default locale. Centova's default is LOCALE=en_US.
    grep '^LOCALE' /usr/local/centovacast/etc/centovacast.conf
  2. List the locales installed on the server and pick the folder you want to change:
    ls /usr/local/centovacast/system/i18n/locale/
    If the locale you use is not in the list, use option 2, or create your own locale as described in Centova Cast v3 localization.
  3. Back up the locale's common.po (German, de_DE, in this example), then open it in an editor, or copy it to your computer and open it in Poedit, which Centova recommends:
    cd /usr/local/centovacast/system/i18n/locale/de_DE
    cp common.po common.po.bak
    nano common.po
  4. Change only the msgstr line below each format. Never change the msgid line. Check the result with grep; this is our edited test file with a day-month order and a 24-hour clock:
    grep -A1 -E 'msgid "_(DATE|TIME|NODAY|NOYEAR)FORMAT"' common.po
    msgid "_DATEFORMAT"
    msgstr "d M Y"
    --
    msgid "_TIMEFORMAT"
    msgstr "H:i"
    --
    msgid "_NODAYFORMAT"
    msgstr "M Y"
    --
    msgid "_NOYEARFORMAT"
    msgstr "d M"
    Optionally, if the gettext tools are installed (apt install gettext or dnf install gettext), check the file syntax with msgfmt -c -o /dev/null common.po; it prints nothing when the file is valid.
  5. Rebuild the language database and restart Centova Cast:
    /usr/local/centovacast/sbin/updatelanguages
    /usr/local/centovacast/centovacast restart

Keep a copy of your edited file, and check the formats again after you update Centova Cast.

Option 2: one format for the whole server

According to Centova, /usr/local/centovacast/etc/centovacast.conf contains the options OVERRIDE_DATEFORMAT, OVERRIDE_TIMEFORMAT, OVERRIDE_NODAYFORMAT and OVERRIDE_NOYEARFORMAT. They are commented out by default. Once set, they apply to every locale on the server, even for users who chose a different locale.

  1. Back up the file: cp /usr/local/centovacast/etc/centovacast.conf /root/centovacast.conf.bak
  2. Open it, find the OVERRIDE_ line you want, remove the # at the start and replace the default value with your format. A 24-hour clock looks like this:
    OVERRIDE_TIMEFORMAT=H:i
    If your format contains spaces, write it the same way as the default value on the commented line.
  3. Restart Centova Cast so it reads the file again: /usr/local/centovacast/centovacast restart

Month names, AM and PM

In a translated locale, the short month names (Jan to Dec) and the AM and PM markers are separate strings in external.po, so translate them there. Changing the server's system locale does not help. In our test with LANG=de_DE.UTF-8, the system date command printed Mo, 09 Mär 2026, while PHP's date function still printed Mon, 09 Mar 2026.

If the change does not show

On a hosted radio or reseller plan you do not have root access to these files, so ask your provider to change the format or your account's locale. On a Centova Cast dedicated server you have root access and can use either option yourself.

Official documentation: Centova Cast v3 localization and Using centovacast.conf.

Was this answer helpful?

Still stuck? Open a ticket