Learn how easy it is to sync an existing GitHub or Google Code repo to a SourceForge project! See Demo

Close

#47 tms_date2unix update for Ubuntu

phpweather-2.x
open
nobody
PHP code (11)
5
2007-08-13
2007-08-13
Jack Coats
No

I am using Ubuntu Feisty, and this routing was not returning the correct data. This was my correction to make it work on my system. This function was in the phpweather.php file:

function tms_date2unix($tmp_tms) {
/* joc20070812 - 2007-08-13 01:00:00 is format returned in Ubuntu Feisty */
return gmmktime(substr($tmp_tms,11,2),substr($tmp_tms,14,2),substr($tmp_tms,17,2),substr($tmp_tms,5,2),substr($tmp_tms,8,2),substr($tmp_tms,0,4));
/* return gmmktime(substr($tmp_tms,8,2),substr($tmp_tms,10,2),substr($tmp_tms,12,2),substr($tmp_tms,4,2),substr($tmp_tms,6,2),substr($tmp_tms,0,4)); */
}

Discussion