Make SVXlink tell 24h time / UTC

After re-setting up my SVXlink node I encoutered the problem that the time announced was using German spelling but English time format. That lead to very strange time announcements during the long identification transmission. Also the 24h time format was missing. After reading around on [1] and [2] I found that this can be overridden locally. The best local.tcl settings were found on a German forum (see [2]). Andi, DL1HRC made a nice local.tcl that just needs to be installed under /usr/share/svxlink/events.d/local. The sub directory has to be created if not existent. So the last issue was to let listeners know that the time ist UTC.

So I extended the local.tcl with an annoucncement of “UTC”. Luckily there is a suitable sound file in the MetarInfo directory. So you can just play the file from MetarInfo context. So the last function of my local.tcl looks as follows:

proc playTime {hour minute} {
  scan $hour "%d" hour;
  scan $minute "%d" minute;

  if {$hour == 0} {
    set hour 0;
  }
  if {$hour == 1} {
    playMsg "Default" "ein";
  } else {
    playNumber [expr $hour];
  }
  playMsg "Default" "uhr";
  if {$minute != 0} {
    if {[string length $minute] == 1} {
      playMsg "Default" "$minute";
    }
    playTwoDigitNumber $minute;
  }
  playMsg "MetarInfo" "utc";
}

The last but one line provides the announcement of UTC. The original local.tcl by DL1HRC can be found on [4].

References

[1] http://svxlink.996268.n3.nabble.com/Time-format-td4424.html
[2] http://svxlink.996268.n3.nabble.com/time-in-24-hour-format-td4989.html
[3] http://forum.svxlink.de/viewtopic.php?f=3&t=313&p=1976&hilit=uhrzeit#p1976
[4] http://svxlink.de/download/locale.tcl