Exception with date()

Discussion about the open-source Phalanger [?] project.

Exception with date()

Postby strfrank » May 30th, 2012, 5:09 pm

Hi,
I've just downloaded the new may version and get an exception while using date() function inside a pure dll.
The message is:

"The type initializer for 'PHP.Library.PhpTimeZone' threw an exception."

and the InnerException message is:

"The time zone ID 'Bahia Standard Time' was not found on the local computer."

Can you help me?
Thanks
strfrank
 
Posts: 20
Joined: May 30th, 2012, 5:05 pm

Re: Exception with date()

Postby Jakub Misek » May 30th, 2012, 9:33 pm

Hi,
what version of Windows do you have?
Jakub Misek │ DEVSENSE s.r.o. | @misekjakubjakub@devsense.com
User avatar
Jakub Misek
 
Posts: 2092
Joined: January 4th, 2012, 2:42 pm
Location: Prague

Re: Exception with date()

Postby strfrank » May 30th, 2012, 10:32 pm

Hi,
I worked on this on a Windows 7 64 bit virtual machine (italian locale), with the previous version of phalanger I didn't have the problem,
Thanks
strfrank
 
Posts: 20
Joined: May 30th, 2012, 5:05 pm

Re: Exception with date()

Postby Jakub Misek » May 30th, 2012, 11:14 pm

'Bahia Standard Time' is time zone which is available thru Windows Update (http://support.microsoft.com/kb/2633952/). Phalanger expects Windows are up to date and contains all the time zones.

For now, you should update your Windows.

We will fix Phalanger so it will handle missing time zones without crashing.
Jakub Misek │ DEVSENSE s.r.o. | @misekjakubjakub@devsense.com
User avatar
Jakub Misek
 
Posts: 2092
Joined: January 4th, 2012, 2:42 pm
Location: Prague

Re: Exception with date()

Postby strfrank » May 31st, 2012, 7:32 am

Many thanks, I applied KB2633952 and now it works perfectly!
I agree about making it work even with missing time zones as I usually see very few fully updated machines (starting from mine :D )
strfrank
 
Posts: 20
Joined: May 30th, 2012, 5:05 pm

Re: Exception with date()

Postby MaitreDede » May 31st, 2012, 8:12 am

Hi,

Does the timezone rely on .net culture ? So I have to install optional language updates to support other timezones ?
MaitreDede
 
Posts: 29
Joined: May 22nd, 2012, 7:17 am

Re: Exception with date()

Postby Jakub Misek » May 31st, 2012, 8:18 am

No, Phalanger uses TimeZone database from Windows, which should be the same on all Windows. There are just some time zones that were introduced after a Windows Update.
Jakub Misek │ DEVSENSE s.r.o. | @misekjakubjakub@devsense.com
User avatar
Jakub Misek
 
Posts: 2092
Joined: January 4th, 2012, 2:42 pm
Location: Prague

Re: Exception with date()

Postby MaitreDede » May 31st, 2012, 1:33 pm

I have an other case :

Code: Select all
Strict Standards: date_default_timezone_get(): Using system time zone settings which may be inaccurate ('Paris, Madrid' zone selected) in D:\Travail\Phalanger.Dede\Prado\phpliteadmin\phpliteadmin.php on line 106, column 1.

Notice: date_default_timezone_set(): Unknown time zone 'Romance Standard Time' in D:\Travail\Phalanger.Dede\Prado\phpliteadmin\phpliteadmin.php on line 106, column 1.


Source code is
Code: Select all
date_default_timezone_set(date_default_timezone_get());


from PhpLiteAdmin project.
MaitreDede
 
Posts: 29
Joined: May 22nd, 2012, 7:17 am

Re: Exception with date()

Postby Jakub Misek » May 31st, 2012, 3:37 pm

I see, default timezone has wrong ID, if not set explicitly in config.
Jakub Misek │ DEVSENSE s.r.o. | @misekjakubjakub@devsense.com
User avatar
Jakub Misek
 
Posts: 2092
Joined: January 4th, 2012, 2:42 pm
Location: Prague


Return to Phalanger project

Who is online

Users browsing this forum: No registered users and 32 guests

cron

User Control Panel

Login

Who is online

In total there are 32 users online :: 0 registered, 0 hidden and 32 guests (based on users active over the past 5 minutes)
Most users ever online was 439 on April 25th, 2024, 10:49 am

Users browsing this forum: No registered users and 32 guests