On 2010-02-13, at 4:51 PM, Octavian Rasnita wrote:

> Don't know how to get the time zone of the user from browser, but I think it 
> is not possible. You might need to get the visitor's IP and use a service 
> that can tell you his/her country or even city, and maybe there is a module 
> that can translate that into DateTime time_zone rformat...

We did this using JavaScript. Just create a Date object and call 
getTimezoneOffset on it. We actually do that twice, one for a summer date and 
one for a winter date. Then we look at both offsets and use that to guess a 
location (rather than just the current time offset). I can send the code if 
needed. 

The technique works pretty well, and gets the timezone pretty well. 

All the best
Stuart

_______________________________________________
List: [email protected]
Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst
Searchable archive: http://www.mail-archive.com/[email protected]/
Dev site: http://dev.catalyst.perl.org/

Reply via email to