If you run rsyslog with $ActionFileDefaultTemplate set to RSYSLOG_FileFormat and set the system timezone to Australia/Adelaide, log messages incorrectly show the offset as +09:08 rather than +09:30.
getCurrTime() in datetime.c tries to convert the timezone offset in seconds (lBias) to OffsetHour and OffsetMinutes:
lBias % 3600 gives the remainder in seconds, not minutes. Since OffsetMinute is a char, the result is effectively (lBias % 3600) % 256, which happens to be 8 in the case of the Australia/Adelaide timezone.
To fix this bug the second line should instead read:
If you run rsyslog with $ActionFileDefa ultTemplate set to RSYSLOG_FileFormat and set the system timezone to Australia/Adelaide, log messages incorrectly show the offset as +09:08 rather than +09:30.
getCurrTime() in datetime.c tries to convert the timezone offset in seconds (lBias) to OffsetHour and OffsetMinutes:
t->OffsetHour = lBias / 3600;
t->OffsetMinute = lBias % 3600;
lBias % 3600 gives the remainder in seconds, not minutes. Since OffsetMinute is a char, the result is effectively (lBias % 3600) % 256, which happens to be 8 in the case of the Australia/Adelaide timezone.
To fix this bug the second line should instead read:
t->OffsetMinute = (lBias % 3600) / 60;