Skip to content
Snippets Groups Projects
Commit 4e5b1f72 authored by Rob Swindell's avatar Rob Swindell :speech_balloon: Committed by Deucе
Browse files

Fix small negative UTC-offset output from smb_zonestr()

When passed values between (-1 and -59), this function would output something
nonsensical like: "UTC0:01" or "UTC0:59". Now we'll make sure there's a minus
sign in these conditions (e.g. "UTC-0:01" and "UTC-0:59").
parent c3da626b
No related branches found
No related tags found
No related merge requests found
......@@ -241,6 +241,8 @@ char* smb_zonestr(int16_t zone, char* str)
if(zone>0)
plus="+";
else if((zone / 60) == 0)
plus="-";
else
plus="";
sprintf(str,"UTC%s%d:%02u", plus, zone/60, zone<0 ? (-zone)%60 : zone%60);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment