Please ConvertToEnglish() – Subtracting zero

Here’s something I encountered while going through some legacy C code.

year =  (p_dt_tm[0]-'0')*1000 + (p_dt_tm[1]-'0')*100 +
        (p_dt_tm[2]-'0')*10   +  p_dt_tm[3]-'0';
mon  =  (p_dt_tm[4]-'0')*10   +  p_dt_tm[5]-'0';
day  =  (p_dt_tm[6]-'0')*10   +  p_dt_tm[7]-'0';
hour =  (p_dt_tm[8]-'0')*10   +  p_dt_tm[9]-'0';
min =  (p_dt_tm[10]-'0')*10   +  p_dt_tm[11]-'0';
sec =  (p_dt_tm[12]-'0')*10   +  p_dt_tm[13]-'0';

Can you figure out and explain what it’s supposed to do?

For bonus points, give an example of what the variable p_dt_tm can contain.

If you can view the code in fixed width font, then you’ll also notice the extent some programmers go to align their code nicely. See how all the plus signs line up vertically? And when the indices go to 2 digits, the programmer deliberately removed some spaces to realign.