In PHP (since 5.2.0) I can write this code:
//$t is timestamp of day I want to look at
$tz=new DateTimeZone('America/New_York');
$transition = $tz->getTransitions($t,$t);
if(!$transition || count($transition)==0)throw new Exception("Bad timezone")
$offset=$transition[0]['offset']; //This is seconds ahead of GMT.
//I.e. -14400 in summer, -18000 in winter.
I nearly cried with joy when I discovered this class/idiom; but is there a way to do the same thing in R? Or do I have to resort to what I used to do in PHP, which was hard-code an array of summertime start/end dates for each timezone I need to consider?
(BTW, for more on the PHP code, see: How to tell if a timezone observes daylight saving at any time of the year? )