I extended the
weewx-GTS extension.
This also refers to the issue
#91 and the discussion
Australia New Weather Measurement Day is 9am not Midnight here at Google. But at first I considered that the plants know nothing about timezones and daylight saving time. On the other hand, local timezones can easily be 2 or even 3 hours away from local sundial time. That is much. And calculating averages or max and min values with a day boundary that much away from real midnight (antitransit of the sun) may not be optimal.
So I created some additional tags to define time spans that have other day boundaries than midnight local timezone time. The offset ist defined within the tag. For example, if you want to aggregate from 9:00 am to 9:00 am and your local timezone offset is 2:00, you could write
$offsetday(dayboundary=-25200).rain.sum
to get the rain of the day with day boundary at 9:00 am. Please note: The offset is in seconds from UTC. For Python <3.7 the value is rounded to whole minutes.
$offsetmonth() and $offsetyear() are also available.
$LMTday, $LMTmonth, $LMTyear define the day according to Local Mean Time, which is at most a quarter of an hour away from sundial time and thus may be the best base to calculate growing degree days.
It is still beta.