Commit 70c9616b authored by Tom Barbalet's avatar Tom Barbalet

Change time/date format

parent 59171cb1
Pipeline #122130775 passed with stages
in 53 minutes and 36 seconds
......@@ -717,13 +717,23 @@ void io_time_to_string(n_string value)
n_int days = land_date();
n_int military_time = (minutes % 60);
n_int hours = (minutes/60);
n_int days_month = (days % 28) + 1;
n_int month = ((days / 28) % 13) + 1;
n_int years = days / (28 * 13);
military_time += hours * 100;
value[0] = '0' + (military_time / 1000) % 10;
value[1] = '0' + (military_time / 100) % 10;
value[2] = '0' + (military_time / 10) % 10;
value[3] = '0' + (military_time / 1) % 10;
value[4] = ':';
io_number_to_string(&value[5], (n_uint)days);
value[2] = ':';
value[3] = '0' + (military_time / 10) % 10;
value[4] = '0' + (military_time / 1) % 10;
value[5] = ' ';
value[6] = '0' + (days_month / 10) % 10;
value[7] = '0' + (days_month / 1) % 10;
value[8] = '/';
value[9] = '0' + (month / 10) % 10;
value[10] = '0' + (month / 1) % 10;
value[11] = '/';
io_number_to_string(&value[12], (n_uint)years);
}
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment