On Sep 23, 2013, at 9:05 AM, carlisle thacker wrote:

> Gabor,
>
> Thanks for your tip about zone.tab.  It provides country codes and  
> lat/lon of the zone's principal location, which while useful is not  
> exactly what I need.  I would like to know the coordinates of time  
> zone boundaries.  Better still would be a function, which returns  
> the name of the time zone in which given lat/lon is situated.
>
> For example, in which time zone is 22N,166W?  And at what times of  
> year might daylight savings time be in effect?

 From the posting from Olivier Eterradossi:

library(geonames)
GNtimezone(22,166)
#----------------
Loading required package: rjson
   rawOffset dstOffset gmtOffset lng lat
1        11         0        11 166  22
Warning message:
In readLines(u) :
   incomplete final line found on 
'http://ws.geonames.org/timezoneJSON?lat=22&lng=166'

So it looks like the middle of the Pacific (GMT-11) near Hawaii. Seems  
a reasonable result.

-- 
David



> Regards,
>
> Carlisle
>
>
> On Sat, Sep 21, 2013 at 3:17 AM, Gabor Grothendieck <ggrothendi...@gmail.com 
> > wrote:
> On Fri, Sep 20, 2013 at 4:31 PM, carlisle thacker
> <carlisle.thac...@gmail.com> wrote:
> > I was looking for something like shown on the map:
> > http://upload.wikimedia.org/wikipedia/commons/8/88/World_Time_Zones_Map.png
> >
> > Information about local daylight savings times would also help.
> >
> > The data are from ships, supposedly in local time, but no time- 
> zone info is
> > given.  A function that would return time zone and whether or not  
> daylight
> > savings time applies at given date would would help.  I'm trying  
> to track
> > down more information about the data and whether they can be  
> referenced to
> > UTC.
>
> The zone.tab file has this information.  See the Examples section at
> the end of ?Sys.timezone for info on its whereabouts.
>

David Winsemius, MD
Alameda, CA, USA


        [[alternative HTML version deleted]]

______________________________________________
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.

Reply via email to