Modulo not acting as expected

I'm working on a WWVB decoder, and one of the operations I'm doing is adjusting from UTC to local time by adding both an offset and DST, depending on whether that is active (part of the WWVB signal). I happen to be -7 offset from UTC, and I'm getting some odd results when the UTC hour is less than 7. I thought that I could use modulo to keep the result always between 0 and 12, but it is returning negative values. This is not how mod behave on any calculator I have. Suggestions?

I've pulled everything out but the mod operation to simplify here:

//Test modulo
int Hours;
int HoursMod;
int DST;

void setup()
{
  Serial.begin(9600);
  Hours = 1;  //Set initial sample value
  DST = -6;  //DST is active
}

void loop()
{
  display_time();
  Hours +=1;
  delay(1000);
}

void display_time()
{
  HoursMod = (Hours + DST) % 12;  //Add (DST + UTC) offset, mod 12, to keep the result in a 12 hour format
   
  Serial.print(Hours);
  Serial.print(" ");
  Serial.println(HoursMod);

Results (UTC hour, followed by adjusted/mod hour): 1 -5 2 -4 3 -3 4 -2 5 -1 6 0 7 1 8 2 9 3 10 4 11 5 12 6 13 7 14 8 15 9 16 10 17 11 18 0

The remainder of (x / y) can be negative if x or y is negative. Some platforms define the modulo operator in other ways, but this platform supports negative modulo.

Using (hours + DST + 24) % 12 will ensure you’re not thrown off with negative numbers for DST.

Thank you! Makes perfect sense now.

I suppose the ability to generate a negative remainder could be very useful in some circumstances, and it's easy enough to correct to a positive otherwise.