Re: [weewx-development] A question on end_archive_period_ts

2019-09-02 Thread Thomas Keffer
With unix epoch time, you don't have to worry about leap seconds. A day is always guaranteed to be exactly 86,400 seconds long. If a leap second occurred during the day, the final epoch time of the day is repeated twice. This makes the math of converting to and from wall clock time super easy.

Re: [weewx-development] A question on end_archive_period_ts

2019-09-02 Thread Pat
John, Greg, This is very helpful! I assumed it was adding a second to the timestamp, but I see now, through the explanations, that it's incrementing the five minute periods since the epoch. A very cool piece of timestamp math. Thanks! -- You received this message because you are subscribed

Re: [weewx-development] A question on end_archive_period_ts

2019-09-02 Thread Greg Troxel
Pat writes: > I don't know why, but I'm fascinated with this small bit of code. I always > wondered how the archive interval runs on the 5th minute reliably (on a > vanilla install). It doesn't matter when you start weewx, it'll run on that > 5th minute interval. If I start weewx at 8:31,

Re: [weewx-development] A question on end_archive_period_ts

2019-09-02 Thread John Kline
No magic here. The division doesn’t give you 5224903, it gives you 5224903.21667 or so. The “int()” knocks off the decimals. It does NOT round up. As such, you are getting the LAST 5 minute period, that is the number of 5 minute periods that have already passed since the epoch. If you had

[weewx-development] A question on end_archive_period_ts

2019-09-02 Thread Pat
I don't know why, but I'm fascinated with this small bit of code. I always wondered how the archive interval runs on the 5th minute reliably (on a vanilla install). It doesn't matter when you start weewx, it'll run on that 5th minute interval. If I start weewx at 8:31, I'll get an archive (most

Re: [weewx-development] weewx 4 on mac

2019-09-02 Thread Thomas Keffer
Seems like we've come to consensus. Good thing, because I know next to nothing about the Mac. Implemented in commit c6ff6ed . On Mon, Sep 2, 2019 at 2:59 PM mwall wrote: > > > On Monday, September 2, 2019 at

Re: [weewx-development] weewx 4 on mac

2019-09-02 Thread mwall
On Monday, September 2, 2019 at 10:36:26 AM UTC-4, Tom Keffer wrote: > > But they are just strings, and mwall's comment about aligning the >> default setup.py path to /home/weewx to match other platforms is >> compelling. >> > > Except, unfortunately, on the Mac, /home is a mounted drive, so we

Re: [weewx-development] weewx 4 on mac

2019-09-02 Thread Thomas Keffer
> > But they are just strings, and mwall's comment about aligning the > default setup.py path to /home/weewx to match other platforms is > compelling. > Except, unfortunately, on the Mac, /home is a mounted drive, so we would have to edit /etc/auto_master, unmount, then reboot. Not worth it.