pewe:
It's OK - the date has changed, but only on the website file and I was looking at the .sql file.
I had to change the other two lines to alter the format of the sql file name.
I have one other question though.
I would like to change the 'time' so it does not use the time on the server but matches the time zone I am in. The server is using a US timezone but I am in the UK (London/Europe).
Is this possible? - if so, how?
Thanks
One way, before presenting the date formatting, I would create a date variable that is equal to the current date, then would shift the date timezone to the desired timezone, then would as coded display the date but have the date variable following in the presentation of the date add a comma, then the variable for the new date. The below hasn't been tested, but generally pieced together from php manual date/time related functions.
So could insert some of the below with the applicable statement:
$newDate = new time();
$newDate->setTimezone(new DateTimeZone('London/Europe'));
//Assuming London/Europe is the correct format.
$file_name = $_SERVER['HTTP_HOST'].'_'.date("dmY-Hi", $newDate); // Create File Name
There appears to be other ways to do it as well, such as using date offset like functions, but ideally you would have somewhere a variable set to represent your local timezone and that would be fed into the function above instead of hard coding it, unless the standard becomes all dates will be in GMT and then there is no question
ZC Installation/Maintenance Support <- Site
Contribution for contributions welcome...