Page 1 of 1

<#update> tag

Posted: Mon 27 Apr 2020 7:21 pm
by freddie
I have just noticed it is giving American-style dates. From my monthly records page:

Code: Select all

Page updated 04/27/2020 19:15:00
Has this changed recently, or has it always been like this?

Re: <#update> tag

Posted: Mon 27 Apr 2020 7:29 pm
by water01
Strange my PHP version is returning the correct results.

Code: Select all

$update                     = "<#update>";  //  date and time of the last web site update (example format: 01 Jan at 18:30:55)
// =====================================================================================================================
$updated                    = "<#update format="'at' hh:mm:ss 'on' MMMM dd">";  //  date and time of the last web site update (example format: at 18:30:55 on 01 Jan)
$updateU                    = strtotime(str_replace('/','-',"<#update>"));  //  (Unix timestamp format)
Returns

Code: Select all

$update                     = "27/04/2020 20:15:00";  //  date and time of the last web site update (example format: 01 Jan at 18:30:55)
// =====================================================================================================================
$updated                    = "at 08:15:00 on April 27";  //  date and time of the last web site update (example format: at 18:30:55 on 01 Jan)
$updateU                    = strtotime(str_replace('/','-',"27/04/2020 20:15:00"));  //  (Unix timestamp format)

Re: <#update> tag

Posted: Mon 27 Apr 2020 7:46 pm
by Mapantz
All OK here too..

$update = "<#update>";
$update = "27/04/2020 20:45:00";

Does it abide by PC settings?

Re: <#update> tag

Posted: Mon 27 Apr 2020 7:54 pm
by freddie
Mapantz wrote: Mon 27 Apr 2020 7:46 pm All OK here too..

$update = "<#update>";
$update = "27/04/2020 20:45:00";

Does it abide by PC settings?
Very strange. It looks as if it must be something local.

Re: <#update> tag

Posted: Mon 27 Apr 2020 7:57 pm
by freddie
freddie wrote: Mon 27 Apr 2020 7:54 pmIt looks as if it must be something local.
Aha! I've changed (in the past month) to using Linux containers* rather than VMs. Just checked the container locale and it is different to the original VM. I will change the container locale setting.

* I highly recommend this approach. Very light on resources compared to a VM, and much faster :-)