Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions USAGE.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ Calculate sunrise and sunset times for the current or targetted day.
The times can be adjusted either for twilight or fixed durations.

The program can either: wait for sunrise or sunset (function: wait),
or return the time (GMT or local) the event occurs (function: list),
or return the time (UTC or local) the event occurs (function: list),
or report the day length and twilight timings (function: report),
or simply report if it is DAY or NIGHT (function: poll).

Expand All @@ -21,7 +21,7 @@ Minor options, any of:
[no]debug Print extra info and returns in one minute. Default: nodebug.
[no]version Print the version number. Default: noversion.
[no]help Print this help. Default: nohelp.
[no]gmt Print times in GMT or local-time. Default: nogmt.
[no]gmt Print times in UTC or local-time. Default: nogmt.

Twilight types, either:
daylight Top of sun just below the horizon. Default.
Expand Down Expand Up @@ -61,7 +61,7 @@ Indicate by program exit-code if is Day or Night using a custom twilight angle o

Example 4: sunwait list 7 gmt sunrise angle 3
List next 7 days sunrise times, custom +3 degree twilight angle, default location.
Uses GMT; as any change in daylight saving over the specified period is not considered.
Uses UTC; as any change in daylight saving over the specified period is not considered.

Example 5: sunwait report y 20 m 3 d 15 10.49S 105.55E
Produce a report of the different sunrises and sunsets on an arbitrary day (2022/03/15) for an arbitrary location (Christmas Island)
Expand Down
12 changes: 6 additions & 6 deletions sunwait.c
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ static void print_usage ()
printf ("The times can be adjusted either for twilight or fixed durations.\n");
printf ("\n");
printf ("The program can either: wait for sunrise or sunset (function: wait),\n");
printf (" or return the time (GMT or local) the event occurs (function: list),\n");
printf (" or return the time (UTC or local) the event occurs (function: list),\n");
printf (" or report the day length and twilight timings (function: report),\n");
printf (" or simply report if it is DAY or NIGHT (function: poll).\n");
printf ("\n");
Expand All @@ -108,7 +108,7 @@ static void print_usage ()
printf (" [no]debug Print extra info and returns in one minute. Default: nodebug.\n");
printf (" [no]version Print the version number. Default: noversion.\n");
printf (" [no]help Print this help. Default: nohelp.\n");
printf (" [no]gmt Print times in GMT or local-time. Default: nogmt.\n");
printf (" [no]utc Print times in UTC or local-time. Default: noutc.\n");
printf ("\n");
printf ("Twilight types, either:\n");
printf (" daylight Top of sun just below the horizon. Default.\n");
Expand Down Expand Up @@ -146,9 +146,9 @@ static void print_usage ()
printf ("Example 3: sunwait poll exit angle 10 54.897786N -1.517536E\n");
printf ("Indicate by program exit-code if is Day or Night using a custom twilight angle of 10 degrees above horizon. Washington, UK.\n");
printf ("\n");
printf ("Example 4: sunwait list 7 gmt sunrise angle 3\n");
printf ("Example 4: sunwait list 7 UTC sunrise angle 3\n");
printf ("List next 7 days sunrise times, custom +3 degree twilight angle, default location.\n");
printf ("Uses GMT; as any change in daylight saving over the specified period is not considered.\n");
printf ("Uses UTC; as any change in daylight saving over the specified period is not considered.\n");
printf ("\n");
printf ("Note that program uses C library functions to determine time and localtime.\n");
printf ("Error for timings are estimated at: +/- 4 minutes.\n");
Expand Down Expand Up @@ -350,7 +350,7 @@ static bool isOffset (runStruct *pRun, const char *pArg)
}

/*
** time_t converted to struct tm. Using GMT (UTC) time.
** time_t converted to struct tm. Using UTC time.
*/
void myUtcTime (const time_t *pTimet, struct tm *pTm)
{
Expand Down Expand Up @@ -609,7 +609,7 @@ int main (int argc, char *argv[])

// Minor Options

// Print output in GMT or local-time
// Print output in UTC or local-time
else if (!strcmp (arg, "gmt") ||
!strcmp (arg, "utc")) pRun->utc = ONOFF_ON;
else if (!strcmp (arg, "nogmt") ||
Expand Down
2 changes: 1 addition & 1 deletion sunwait.h
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ typedef struct
OnOff functionPoll; // User wants a "NIGHT" or "DAY" return code/text
OnOff functionWait; // User wants the program to wait until sunrise or sunset

OnOff utc; // Printed output is in GMT/UTC (on) or localtime (off)
OnOff utc; // Printed output is in UTC (on) or localtime (off)
OnOff debug; // Is debug output required

OnOff reportSunrise; // Report sun rising
Expand Down