risacher / sunwait

Sunwait calculates sunrise or sunset times with civil, nautical, astronomical and custom twilights, for use with Windows Task Scheduler or 'cron' on Linux.
GNU General Public License v3.0
193 stars 45 forks source link

Fix error in print.cpp in displaying target time #9

Closed danieldjewell closed 3 years ago

danieldjewell commented 4 years ago

The "nowTm" struct was being used for the target time data in report even though "targetTm" was already being created/populated.

The end result was that the "Target Time" was always the local time and not a time specified... see below for the before example.

$ ./sunwait report y 20 m 12 d 1 35.0N 120.0W
...
Target Information ...

                   Location:  ...........
                       Date: 09-Feb-2020
                   Timezone: MST
   Sun directly north/south: 12:42
             Twilight angle: -0.83 degrees (daylight)