Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

date format

Status
Not open for further replies.

wimkumpen

Programmer
Jun 13, 2009
8
BE
Hello,

I'm reading a rss file, I want to save the items to my database. The pubDate of the rss is something like this:
'Sun, 22 Nov 2009 17:05:47 GMT'.

First of all, how could I convert this string to something like 'yyyy-mm-dd hh:mm:ss' to save to my database.

Secondly, I'm from belgium, my timezone is GMT +1 (and in the summer GMT +2). So, do I need to do something extra with the date?

I'm not so good with date functions...
 
this should do the necessary

Code:
date_default_timezone_set('BELGIUM/BRUSSELS');
$dbDate = date('Y-m-d", strtotime('Sun, 22 Nov 2009 17:05:47 GMT');
 
allright thanks,

Just one thing, it's : 'Europe/Brussels'
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top