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

Bug 356052

Summary: EGit should not offer date formatting preference
Product: [Technology] EGit Reporter: Dani Megert <daniel_megert>
Component: UIAssignee: Project Inbox <egit.ui-inbox>
Status: RESOLVED WONTFIX QA Contact:
Severity: normal    
Priority: P3 CC: dariusz.luksza, matthias.sohn, pwebster, remy.suen, robert.munteanu, robin.rosenberg
Version: 1.1   
Target Milestone: ---   
Hardware: PC   
OS: Windows 7   
Whiteboard:

Description Dani Megert CLA 2011-08-29 04:20:41 EDT
1.1.0.201108251914.

EGit should not offer a date/time formatting preference but honor the date and time format that I have setup on my OS. Currently, the Git history comes with wrong dates compared to the local history or the CVS history.
Comment 1 Dani Megert CLA 2011-10-05 07:08:46 EDT
(In reply to comment #0)
> 1.1.0.201108251914.
> 
> Currently, the Git history comes with
> wrong dates compared to the local history or the CVS history.

This is even worse: the History view doesn't even use that Git preference. The format seems to be completely hard-coded. Filed bug 359961 to track that.
Comment 2 Dani Megert CLA 2011-10-28 06:05:40 EDT
The preference is only used at one place: GitChangeSetLabelProvider (i.e. in the change set mode of the Synchronize view). All other places use hard-coded stuff or the OS default.

It was added via bug 336130.

Matthias, I suggest to remove this. I'll provide the patch if you agree.
Comment 3 Dani Megert CLA 2011-11-01 10:17:28 EDT
Pushed  http://egit.eclipse.org/r/4452 for review.
Comment 4 Dariusz Luksza CLA 2011-11-01 17:25:27 EDT
From my personal point of view I would prefer to set up date formatting for EGit in preferences rather then reusing or changing my system settings. I can agree on adjusting GTM's but not on reusing system setting. In some cases it could be annoying to see full blown date format in tiny eclipse view.
Comment 5 Robin Rosenberg CLA 2011-11-01 18:16:09 EDT
(In reply to comment #4)
> From my personal point of view I would prefer to set up date formatting for
> EGit in preferences rather then reusing or changing my system settings. I can
> agree on adjusting GTM's but not on reusing system setting. In some cases it
> could be annoying to see full blown date format in tiny eclipse view.

We could use this settings after enhancement in all of EGit. Since we now have
the EGit formatter we could perhaps use that. Do we need this very custom
format or would just the ones in GitDateFormatter do?
Comment 6 Dani Megert CLA 2011-11-02 03:18:30 EDT
(In reply to comment #4)
> From my personal point of view I would prefer to set up date formatting for
> EGit in preferences rather then reusing or changing my system settings.

Assume you have 20 plug-ins installed. Would you like if you had to change a certain setting 20 times? In my past 20 years I never changed a date in any application but maybe it's just me ;-).


(In reply to comment #5)
> We could use this settings after enhancement in all of EGit. Since we now have
> the EGit formatter we could perhaps use that. Do we need this very custom
> format or would just the ones in GitDateFormatter do?

I think if EGit really introduces a date format then that format should be used consistently in EGit. By default it should be initialized to DateFormat.getDateTimeInstance().
Comment 7 Dariusz Luksza CLA 2011-11-02 03:35:11 EDT
(In reply to comment #6)
> Assume you have 20 plug-ins installed. Would you like if you had to change a
> certain setting 20 times? In my past 20 years I never changed a date in any
> application but maybe it's just me ;-).

Even if I had 100 plugins installed I doubt that all of them would display/format dates somewhere. I can agree on using system format as a default one but we should give opportunity to change it if some one wants to (and such change shouldn't affect yours system setting)

> I think if EGit really introduces a date format then that format should be used
> consistently in EGit. By default it should be initialized to
> DateFormat.getDateTimeInstance().

I can agree on such approach (as I mention above).
Comment 8 Dani Megert CLA 2011-11-02 03:40:09 EDT
OK, so the fix would be to use GitDateFormatter everywhere and let the GitDateFormatter use the preference, right? And we would mark bug 359961 as duplicate of this one.
Comment 9 Robin Rosenberg CLA 2011-11-02 19:44:35 EDT
(In reply to comment #8)
> OK, so the fix would be to use GitDateFormatter everywhere and let the
> GitDateFormatter use the preference, right? And we would mark bug 359961 as
> duplicate of this one.

No, this one is about removing the setting. Using the setting consistently is an enhancement request.
Comment 10 Dani Megert CLA 2011-11-03 03:45:37 EDT
(In reply to comment #9)
> (In reply to comment #8)
> > OK, so the fix would be to use GitDateFormatter everywhere and let the
> > GitDateFormatter use the preference, right? And we would mark bug 359961 as
> > duplicate of this one.
> 
> No, this one is about removing the setting. Using the setting consistently is
> an enhancement request.

Sorry, I'm not getting it. Isn't the result of the discussion that we don't want to remove the setting but instead make sure to use it everywhere?
Comment 11 Dani Megert CLA 2011-11-03 03:47:38 EDT
> > No, this one is about removing the setting. Using the setting consistently is
> > an enhancement request.
> 
> Sorry, I'm not getting it. Isn't the result of the discussion that we don't
> want to remove the setting but instead make sure to use it everywhere?

Or is it only that you don't want to reuse this bug report here i.e. we close this one as WONTFIX and open a new bug which would also cover/fix bug 359961?
Comment 12 Robin Rosenberg CLA 2013-02-27 17:08:26 EST
We do want a preference.