foluska Posted April 12, 2009 Share Posted April 12, 2009 Hi, I would like to format dc:date to more standard format. Something like this: 2009-04-12T21:43:20-07:00 to Sun, 12 Apr 2009 18:43:20 GMT Thank you in advance! Link to comment https://forums.phpfreaks.com/topic/153776-formating-dcdate/ Share on other sites More sharing options...
Humpty Posted April 13, 2009 Share Posted April 13, 2009 I'm a little unsure what dc:date is exactly but perhaps this will help you: $MyTime = mktime(hour, minute, second, month, day ,Year); $MyNewTime = date("d-m-Y H:i:s", $MyTime); The mktime is 24 hours, and you can do maths in it too ! You can search web for help on both those functions, they are in the manual and I think they make pretty good sense. If you have to you may need to split your orignal date format up as a series of strings first. As I said I am not familiar with it and the -07:00 threw me off. Link to comment https://forums.phpfreaks.com/topic/153776-formating-dcdate/#findComment-808525 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.