gharris999;585682 Wrote: > If the "tea party" candidates win big here in the states next Tuesday, > I'm sure I'll need to modify that code to account for non-hour > incremental changes and "fall-ahead, spring back" switches...i.e. there > will be a need to accommodate a higher ambient level of irrationality in > (what for now) is civil time-keeping. I.e., I don't think we'll be able > to count on there being much "civil" left in public regulation. Hah. Excuse the political opinion coming from a -biased, uninformed,...- foreigner, but the way I see it, these guys could change the number of hours there is in a day! The people's decision is always, well... the people's decision. > There's lot's of assumptions made there about the nature of a > Summer/Winter time change. It's assumed that the change will be one > hour and that it follows the "springs ahead, falls back" convention. And I was ready to contend that some parts of the world are using computer unfriendly schemes, like shifting 3 times 30 minutes over X days. It used to be, but according to this (crappy reference, sorry): http://www.timeanddate.com/time/dstevents.html , zones that shift do it by 1 full hour. So your code seems right, for 2011 at least :)
(Using a symbolic expression like "8 hours 30 minutes @ day X" via the DateTime package is something I used to pivot to the right epoch time even across DST thresholds. Supposedly it is more generic and would work with awkward DST schemes. When a local date exists twice, the latest epoch date is returned, nice. But when date "8 hours 30 minutes @ day X" does not exist, that's an exception and I never could fathom a relevant epoch date to wake the server in this case: 15 minutes before ? 30 ... 90 ??) -- epoch1970 Daily dose delivered by: 2 SB Classic (fw 130), 1 SB Boom (fw 50) SqueezeCenter 7.3.4 (Debian 5.0) with plugins: ContextMenu, SaverSwitcher by Peter Watkins Server Power Control by Gordon Harris WeatherTime by Martin Rehfeld IRBlaster by Gwendesign (Felix) FindArt, CDplayer by bpa BBC iPlayer, SwitchPlayer by Triode PowerSave by Jason Holtzapple TrackStat by Erland Isaksson. ------------------------------------------------------------------------ epoch1970's Profile: http://forums.slimdevices.com/member.php?userid=16711 View this thread: http://forums.slimdevices.com/showthread.php?t=48521
_______________________________________________ plugins mailing list [email protected] http://lists.slimdevices.com/mailman/listinfo/plugins
