-
Notifications
You must be signed in to change notification settings - Fork 2
Home
Aygath edited this page Sep 12, 2022
·
4 revisions
Welcome to the zon wiki! The following are example outputs.
Note: Your correct location data may be found in de zone1970.tab file:
grep "$TZ" /usr/share/zoneinfo/zone1970.tab NL +5222+00454 Europe/Amsterdam
See if the sun is up "+" or down "-":
$ zon +
See the next sun rise event:
$ zon --rise # OR zon -r 2021-10-15T06:08+00:00
# Same, but pretty print with standard formatting by the date command: $ date -d $(zon -r) Fri Oct 15 08:08:00 CEST 2021
Add a label to the output:
$ zon -v --rise # OR zon -rv 2021-10-15T06:08+00:00 rise
Specify another date:
$ zon -r -d 2021-12-31T23:00+00:00 2022-01-01T07:52+00:00
Specify another date with syntax of the date command:
$ zon -rv -d "date today + 2 months" 2021-12-15T07:46+00:00 rise
Request display of extra information for sun rise calculation:
$ zon -rvv -d "date today + 2 months" -l +491154+0021422 Location str (should be +DDMM[SS]+DDDMM[SS]): +491154+0021422 len 15 Latitude (+ is north) and Longitude (+ is east) decimal values : +49.198333 +2.239444 running date command: date -Im -d "today + 2 months" system time using local time zone Thu Oct 14 19:44:18 2021 base time in local time zone Tue Dec 14 18:12:00 2021 Local Timezone secs -3600 Day with at a sun set and/or rise event. RS +0 2021-12-15T07:43+00:00 rise
Display all of current up/down, sun rise and sun set together and with a label:
$ zon -crsv # OR zon --current --rise --set --verbose 2021-10-15T06:08+00:00 rise 2021-10-15T16:41+00:00 set - down now
Display begin of civil twighlight, is stead of sun rise, in a format usable by the systemd --on-calendar command:
$ zon --rise --civil --systemd 2021-10-15 05:30 UTC
Display current azimuth and altitude, together with other current information:
$ zon -cvv # OR zon --current --verbose --verbose Location str (should be +DDMM[SS]+DDDMM[SS]): +491154+0021422 len 15 Latitude (+ is north) and Longitude (+ is east) decimal values : +49.198333 +2.239444 system time using local time zone Thu Oct 14 20:00:43 2021 base time in local time zone Thu Oct 14 20:00:43 2021 Local Timezone secs -3600 Day with at a sun set and/or rise event. RS +0 - down now sun azimuth=269.911922 altitude=-11.085427
Display for a range of dates:
$ zon$ for dd in {40..50} ; do ./zon -rd "date today + $dd day" | date -f - ; done Sun Oct 23 08:18:00 CEST 2022 Mon Oct 24 08:20:00 CEST 2022 Tue Oct 25 08:22:00 CEST 2022 Wed Oct 26 08:23:00 CEST 2022 Thu Oct 27 08:25:00 CEST 2022 Fri Oct 28 08:27:00 CEST 2022 Sat Oct 29 08:29:00 CEST 2022 Sun Oct 30 07:31:00 CET 2022 Mon Oct 31 07:32:00 CET 2022 Tue Nov 1 07:34:00 CET 2022 Wed Nov 2 07:36:00 CET 2022