Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 427192

Summary: Directory Web Browser: file date counting days in year, not month
Product: [ECD] Orion Reporter: Adrian Aichner <adrian.aichner>
Component: ServerAssignee: Adrian Aichner <adrian.aichner>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: P3 CC: ken_walker, mamacdon, simon_kaegi
Version: 5.0Flags: ken_walker: review+
Target Milestone: 5.0 RC3   
Hardware: PC   
OS: Windows XP   
Whiteboard:

Description Adrian Aichner CLA 2014-02-01 09:28:34 EST
Index of /adrian-OrionContent/SnapperFirefox/Snapper/

Name                          Last modified		Size  

package.json                  2014/02/32 14:01:28      3258
npm-debug.log                 2014/01/31 14:49:10      1322

Interestingly 2014/01/31 is still displayed correctly, but February 1st shows up as February 32.
Comment 1 Mark Macdonald CLA 2014-02-01 11:58:02 EST
Heh. The directory listings are using "Day in year" where they intended to use "Day in month". So after January, the "day" field keeps counting up: 31, 32, ... 365.
Comment 2 Adrian Aichner CLA 2014-02-01 14:33:28 EST
(In reply to Mark Macdonald from comment #1)
> Heh. The directory listings are using "Day in year" where they intended to
> use "Day in month". So after January, the "day" field keeps counting up: 31,
> 32, ... 365.

Yep, but the month is wrong too.
Comment 3 Adrian Aichner CLA 2014-02-01 14:58:05 EST
Delete comment 2, I was confused.
Comment 4 Adrian Aichner CLA 2014-02-12 07:59:10 EST
I can handle this bug, if someone assigns it to me.

org.eclipse.orion.server/bundles/org.eclipse.orion.server.servlets/src/org/eclipse/orion/internal/server/servlets/file/GenericDirectoryHandler.java

public class GenericDirectoryHandler extends ServletResourceHandler<IFileStore> {
private SimpleDateFormat dateFormat = new SimpleDateFormat("yyyy/MM/DD HH:mm:ss"); //$NON-NLS-1$

should become

public class GenericDirectoryHandler extends ServletResourceHandler<IFileStore> {
private SimpleDateFormat dateFormat = new SimpleDateFormat("yyyy/MM/dd HH:mm:ss"); //$NON-NLS-1$
Comment 5 Adrian Aichner CLA 2014-02-12 08:19:35 EST
See
https://git.eclipse.org/r/21880
Comment 6 Adrian Aichner CLA 2014-02-12 09:42:14 EST
I have verified my solution locally on my orion server and it works fine.
Comment 7 Adrian Aichner CLA 2014-02-20 08:06:57 EST
I would like to propose my fix for this obvious bug for inclusion in RC3 or before 5.0 goes out.

See
https://git.eclipse.org/r/#/c/21880/
Comment 8 Ken Walker CLA 2014-02-20 10:59:33 EST
We'll try to get this in today Adrian
Comment 9 Mark Macdonald CLA 2014-02-20 13:23:59 EST
Merged via Gerrit