? ? Failure

User tests: Successful: Unsuccessful:

avatar DimionX
DimionX
27 Jun 2018

Pull Request for Issue #20905.

Summary of Changes

  1. Turn off translating Last-Modified header
  2. Append " GMT" to date format

Testing Instructions

  1. Set Russian Language
  2. Allow cache and set modified date:
$app = JFactory::getApplication();
$doc = JFactory::getDocument();
$app->allowCache(true);
$doc->setModifiedDate('Wed, 17 Aug 2005 00:00:00 GMT');

Expected result

Last-Modified: Wed, 17 Aug 2005 00:00:00 GMT

Actual result

Last-Modified: Ср, 17 авг 2005 00:00:00

avatar DimionX DimionX - open - 27 Jun 2018
avatar DimionX DimionX - change - 27 Jun 2018
Status New Pending
avatar joomla-cms-bot joomla-cms-bot - change - 27 Jun 2018
Category Libraries
avatar brianteeman
brianteeman - comment - 27 Jun 2018

There was a reason you were asked to complete various sections when you submitted this. Please do so.

avatar DimionX DimionX - change - 27 Jun 2018
The description was changed
avatar DimionX DimionX - edited - 27 Jun 2018
avatar DimionX
DimionX - comment - 27 Jun 2018

done

avatar franz-wohlkoenig
franz-wohlkoenig - comment - 28 Jun 2018

@DimionX can you please Info which Issue is solved by your PR? You wrote "Pull Request for Issue #20905" which is this PR.

avatar DimionX
DimionX - comment - 28 Jun 2018

Pull request solves an Issue of incorrect sending of response header (Last-Modified)

avatar brianteeman
brianteeman - comment - 28 Jun 2018

It is correct to add GMT as it is part of the rfc1123 specification. As it is always GMT and not a timezone I believe this is more correct than @mbabker suggestion and follows the recommendation at PHP.net

http://php.net/manual/en/function.gmdate.php

avatar mbabker
mbabker - comment - 28 Jun 2018

Honestly either way works. The format() method is already being told to format the Date instance's timestamp in GMT, so it will always output a GMT time. Just a personal nitpick about arbitrarily printing "GMT" on its own outside the format() method versus including it in the format() method's output to begin with. The only way it would be problematic is if the timezone identifiers couldn't reliably output "GMT", in which case it's 100% right as is.

avatar laoneo laoneo - change - 25 Mar 2022
Labels Added: ?
Removed: ?
avatar laoneo
laoneo - comment - 25 Mar 2022

Sorry that there were no responses for such a long time. Can you add the suggestion from Michael and update the test instructions so we can properly test it. In the meantime I'm closing the pr, when ready, please reopen again. Thanks for your help making Joomla better.

avatar laoneo laoneo - close - 25 Mar 2022
avatar laoneo laoneo - change - 25 Mar 2022
Status Pending Closed
Closed_Date 0000-00-00 00:00:00 2022-03-25 18:01:15
Closed_By laoneo
avatar laoneo laoneo - change - 25 Mar 2022
Status Closed New
Closed_Date 2022-03-25 18:01:15
Closed_By laoneo
avatar laoneo laoneo - change - 25 Mar 2022
Status New Pending
avatar laoneo
laoneo - comment - 25 Mar 2022

I apologize, my impression was that this pr is not complete. Reopening again.

avatar laoneo laoneo - reopen - 25 Mar 2022
avatar laoneo
laoneo - comment - 25 Mar 2022

I have tested this item successfully on e840c86


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/20905.

avatar laoneo laoneo - test_item - 25 Mar 2022 - Tested successfully
avatar richard67
richard67 - comment - 26 Mar 2022

I have tested this item successfully on e840c86

I've added the code snipped from the testing instructions (except of the first line because that was already there) to the index.php of the site template and inspected the response header in the browser's developer tools.

Without this PR applied it is "last-modified: Thu, 01 Jan 1970 00:00:00 GMT".

With this PR applied it is "last-modified: Wed, 17 Aug 2005 00:00:00 GMT".

I used Russian site language for the test.

So it seems the browser can't understand the Russian day and month names and so can't understand the time stamp and so sets it to zero = begin of epoch.

With the patch of this PR applied I get the expected value.

With the patch applied but without the code snippet from the testing instructions, everything works as well as before regarding the last-modified header.


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/20905.

avatar richard67 richard67 - test_item - 26 Mar 2022 - Tested successfully
avatar richard67 richard67 - change - 26 Mar 2022
Status Pending Ready to Commit
avatar richard67
richard67 - comment - 26 Mar 2022

RTC


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/20905.

avatar zero-24 zero-24 - change - 30 Apr 2022
Labels Added: ?
avatar zero-24
zero-24 - comment - 30 Apr 2022

Will merge this here now. Thanks ?

avatar zero-24 zero-24 - change - 30 Apr 2022
Status Ready to Commit Fixed in Code Base
Closed_Date 0000-00-00 00:00:00 2022-04-30 07:09:15
Closed_By zero-24
avatar zero-24 zero-24 - close - 30 Apr 2022
avatar zero-24 zero-24 - merge - 30 Apr 2022

Add a Comment

Login with GitHub to post a comment