Merge pull request #69 from narspt/patch-1

Fix bug in code to say French time
This commit is contained in:
Jonathan Naylor 2021-06-03 19:22:53 +01:00 committed by GitHub
commit 380c0941e7
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -618,8 +618,12 @@ wxArrayString CTimeServerThread::sendTimeFrFR(unsigned int hour, unsigned int mi
words.Add(wxT("il_est"));
if (min == 45U)
hour++;
if (min == 45U) {
if (hour == 23U)
hour = 0U;
else
hour++;
}
if (hour == 0U) {
words.Add(wxT("minuit"));
@ -660,10 +664,6 @@ wxArrayString CTimeServerThread::sendTimeFrFR(unsigned int hour, unsigned int mi
words.Add(wxT("et_demie"));
} else if (min == 45U) {
words.Add(wxT("moins_le_quart"));
if (hour == 23U)
hour = 0U;
else
hour++;
}
return words;