Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

setTimeSeriesDate() doesn't run #1

Closed
felakuti4life opened this issue Oct 4, 2013 · 1 comment
Closed

setTimeSeriesDate() doesn't run #1

felakuti4life opened this issue Oct 4, 2013 · 1 comment
Labels

Comments

@felakuti4life
Copy link
Owner

Requires proper implementation- current implementation of date_parse() is broken:

public function setTimeSeriesStartDate(){
        //FIXME
        //replace T with space to make it parsable by date_parse()
        $tempDate = $this->date;
        $tempDate[10] = ' ';
        $parsedDate = new DateTime(date_parse($tempDate));

        $parsedDate->modify('-'.$this->daysBeforeEvent.' day');
        $farmattedDate=$parsedDate->format('Y-m-d H:i:s');
        if($formattedDate){
            $this->timeSeriesStartDate= $formattedDate;
            $this->timeSeriesStartDate[10]='T';
        }
        else {$this->timeSeriesStartDate = $this->date;}
    }
@felakuti4life
Copy link
Owner Author

Fixed.

Thanks to John Conde and anyone that participated in the corresponding stack overflow question:
http://stackoverflow.com/questions/19233293/parsing-and-modifying-dates-in-php

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant