# split and strftime on PHP5.3

- Thread: https://externals.io/message/44161
- Original archive: https://news-web.php.net/php.internals/44161
- Started by Lester Caine on 2009-06-04T21:02:00+00:00
- Messages: 4
- Reply by email to internals@lists.php.net
- More for agents: search with https://externals.io/search.md?q={query} · JSON API at https://externals.io/api · documentation at https://externals.io/llms.txt

---

## #44161 — Lester Caine — 2009-06-04T21:02:00+00:00

URL: https://externals.io/message/44161#44161

OK now that I have a working PHP5.3 set-up, the first problem seems to 
be fixing the libraries we use so they are clean.

1/
Split() needs looking at in ADOdb and Smarty ...
Where should I be looking for notes on that?

2/
"It is not safe to rely on the system's timezone settings. You are 
*required* to use the date.timezone setting or the 
 `date_default_timezone_set()` function. In case you used any of those 
methods and you are still getting this warning, you most likely 
misspelled the timezone identifier. We selected 'Europe/London' for 
'1.0/DST' instead in"

But the bitweaver structure works in UTC for everything and only 
converts to a time zone if the client has set one in their profile. We 
have had too many problems with PHP trying to default to 'server time' 
and so that is never used. So how do we get rid of this warning?

And not a Firebird bug in sight :)

-- 
Lester Caine - G8HFL
-----------------------------
Contact - http://lsces.co.uk/wiki/?page=contact
L.S.Caine Electronic Services - http://lsces.co.uk
EnquirySolve - http://enquirysolve.com/
Model Engineers Digital Workshop - http://medw.co.uk//
Firebird - http://www.firebirdsql.org/index.php

---

## #44162 — Derick Rethans — 2009-06-04T21:11:49+00:00

URL: https://externals.io/message/44161#44162 · In reply to: #44161

> 2/
> "It is not safe to rely on the system's timezone settings. You are *required*
> to use the date.timezone setting or the `date_default_timezone_set()` function.
> In case you used any of those methods and you are still getting this warning,
> you most likely misspelled the timezone identifier. We selected
> 'Europe/London' for '1.0/DST' instead in"
> 
> But the bitweaver structure works in UTC for everything and only converts to a
> time zone if the client has set one in their profile. We have had too many
> problems with PHP trying to default to 'server time' and so that is never
> used. So how do we get rid of this warning?

Like the error message says:

	"You are *required* to use the date.timezone setting or the 
	 `date_default_timezone_set()` function."

regards,
Derick

-- 
http://derickrethans.nl | http://ezcomponents.org | http://xdebug.org
twitter: @derickr

---

## #44164 — Elizabeth M Smith — 2009-06-04T21:58:52+00:00

URL: https://externals.io/message/44161#44164 · In reply to: #44161

Lester Caine wrote:
> OK now that I have a working PHP5.3 set-up, the first problem seems to
> be fixing the libraries we use so they are clean.
> 
> 1/
> Split() needs looking at in ADOdb and Smarty ...
> Where should I be looking for notes on that?
> 

POSIX ereg stuff is now deprecated

see preg_split, explode, str_split as replacements
see manual

Thanks,
Elizabeth

---

## #44165 — Lester Caine — 2009-06-04T22:41:44+00:00

URL: https://externals.io/message/44161#44165 · In reply to: #44162

Derick Rethans wrote:
> 
> 
> > […]
> 
> Like the error message says:
> 
> 	"You are *required* to use the date.timezone setting or the 
> 	 `date_default_timezone_set()` function."

 `date_default_timezone_set()` was part of the code which was why I was 
confused ;)
Just forgot to ensure it was not called when PHP4/5.0 is being used so 
it had been commented out again to fix that fault :(

Now onto replacing a lot of split() calls ... OK only 176 across ADOdb, 
Smarty and bitweaver ...

-- 
Lester Caine - G8HFL
-----------------------------
Contact - http://lsces.co.uk/wiki/?page=contact
L.S.Caine Electronic Services - http://lsces.co.uk
EnquirySolve - http://enquirysolve.com/
Model Engineers Digital Workshop - http://medw.co.uk//
Firebird - http://www.firebirdsql.org/index.php
