FUDforum
Fast Uncompromising Discussions. FUDforum will get your users talking.

Home » Imported messages » comp.lang.php » new DateTimeZone and html encoding
Show: Today's Messages :: Polls :: Message Navigator
Return to the default flat view Create a new topic Submit Reply
Re: new DateTimeZone and html encoding [message #172838 is a reply to message #172835] Fri, 04 March 2011 12:20 Go to previous messageGo to previous message
alvaro.NOSPAMTHANX is currently offline  alvaro.NOSPAMTHANX
Messages: 277
Registered: September 2010
Karma:
Senior Member
El 04/03/2011 12:12, polilop escribió/wrote:
>> $oldTZone= new DateTimeZone("Pacific Time (US & Canada");
>> or
>> $oldTZone=timezone_open("Pacific Time (US & Canada")
>> i get
>> Unknown or bad timezone (Pacific Time (US & Canada))
>>
>> it seems that it encodes the &. How can i disable it from doing so?
>>
> No.
> The supported timeszones are listed here:
> http://www.php.net/manual/en/timezones.php
>
> Yap, youre right. I'm using icalc to read ics exported from outlook.
> some versions of office give the timezones as listed,
> but office 2007 gives as i stated above so i thought they were allso legit.

It's funny but American web sites love to provide time in their local
time (which is fine, I do it as well) and identify the time zone as
"Pacific Time", as if the Pacific ocean was a small lake near Greenwich.

I presume your actual question is how to parse a string with a free
English description of a time zone and extract the actual information. I
see no other way than compiling a database with all the possible variations.

ICS is (supposedly) a standardised format. The funny thing is that «does
not define a naming convention for time zone identifiers»

http://tools.ietf.org/html/rfc5545#section-3.2.19

At least, there's a link to a public domain TZ database...


--
-- http://alvaro.es - Álvaro G. Vicario - Burgos, Spain
-- Mi sitio sobre programación web: http://borrame.com
-- Mi web de humor satinado: http://www.demogracia.com
--
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Stats comp.lang.php (last 7 days)
Next Topic: newbie question
Goto Forum:
  

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ]

Current Time: Fri Sep 20 14:43:31 GMT 2024

Total time taken to generate the page: 0.06596 seconds