diff --git a/01_git/astime_x.c b/01_git/astime_x.c index 3183b1522c1d491c1aeab47df237b2e01ff79a0b..79b7cc71eab282f2144cfefd79f5b3de3f6b4979 100644 --- a/01_git/astime_x.c +++ b/01_git/astime_x.c @@ -419,7 +419,7 @@ void calculate_hands() #ifdef DEBUG if (i == 0) { double start, end; - int start_hour, start_min, end_hour, end_min; + int start_hour, start_min, start_sec, end_hour, end_min, end_sec; /* printf("%d hour = %d %d -> %d %d, xrate = %f, yrate = %f\n", loc_time->tm_hour, lines[2].x1, lines[2].y1, @@ -432,8 +432,12 @@ void calculate_hands() end -= end_hour; start_min = (int) (start * 60); end_min = (int) (end * 60); - printf("Buergerliche Daemmerung beginnt um %d:%d Uhr und endet um %d:%d Uhr.\n", - start_hour, start_min, end_hour, end_min); + start -= ((double) start_min) / 60.0; + end -= ((double) end_min) / 60.0; + start_sec = (int) (start * 360); + end_sec = (int) (end * 360); + printf("Buergerliche Daemmerung beginnt um %d:%d:%d Uhr und endet um %d:%d:%d Uhr.\n", + start_hour, start_min, start_sec, end_hour, end_min, end_sec); } #endif