On Mon, Apr 9, 2018 at 2:05 PM, Tom Smyth <[email protected]> wrote:
> Howdy... > Daylight savings time sucks... :/... > Is there a way to Reference UTC and then do the calculating > n and then convert to local time zone if you are worried about > calculating yesterday on the edge case of the 2 hrs a year > that this would make an impact... > What...why...why are you making this harder than it has to be? mktime/localtime let you perform calculations based on time broken down into years/months/days/etc. "Yesterday" is a calculation based on days, so do it in that form. Those APIs exist to let you do that! That's what the solution I provided in my original reply does! > as a side issue would avoiding running this particular job > between 11PM and 1am prevent the edge case from having > an impact > So you know how to do the Right Thing, but you're going to instead leave a bug for you or your successor to hit months or years away? Please do not do that on any system that others might depend on. Philip Guenther

