The Sidebar Ephemeris is Back
Before I retired, I wrote a solar ephemeris widget for the sidebar in our family blog. Earlier this year, I copied that code into the sidebar of “The Wandering Minstrel.” All was well until daylight savings time ended and then the ephemeris here was an hour off. I checked the other site and the ephemeris there was correct - it appeared that the same identical code worked there and not here. I removed the widget from here and vowed that I would fix it - someday.
I started digging into the problem a few days ago. After a lot of double checking and head scratching, I consulted the date() object and related time/date functions to see if there was some hidden property. I wrote some diagnostic code and discovered that the default date_default_timezone_set(timezone) was set to America/Los_Angeles here and America/Phoenix on the other site. Both Arizona and Los Angeles are on Mountain Standard Time (GMT -7) during daylight savings time. Arizona never goes to DST so that explained the one-hour error after LA went on standard time (GMT -8).
I fixed the problem (for both sites) by explicitly setting the PHP timezone object date_default_timezone_set(timezone) to America/Phoenix. The ephemeris widget is near the bottom of the left sidebar. Note that as winter solstice is tomorrow the daylight value is less than ten hours (sunup to sundown).

Browsing through the guns magazines, I notice little square smart phone scan codes in ads and in some articles. Being the nerd that I am, I finally got curious enough to find out what this technology is all about, although I have no use for anything like this other than perhaps putting it on a business card for contact information.


Click Here To Contribute



