Page MenuHomePhabricator

Mixed date format used in transactions
Closed, WontfixPublic

Description

I've performed 2 changes on a repository:

  1. deactivated it in July
  2. changed it's url in November

however date format used to display change time is different for each record (see image below):

Phabricator_RepositoryMixedDateFormat.png (287×835 px, 54 KB)

I doubt that formatted date is stored in database, so this surely must be some display inconsistency. I'm not sure if that's system-wide or Repositories-specific issue.

Event Timeline

aik099 raised the priority of this task from to Needs Triage.
aik099 updated the task description. (Show Details)
aik099 added a project: Repositories.
aik099 added a subscriber: aik099.
epriestley claimed this task.

We change formats for dates that happened a while ago, under the theory that you don't need to know the year for recent events and don't need to know the weekday for events that happened long ago.

It's ok, that format was changed. What I consider a bug, that different formats coexist in same list. If you do store parsed date format in DB, then why this wasn't fixed by a migration?

July 8 was a long time ago, so we use the "a long time ago" format.
Nov 9 was a few days ago, so we use the "a few days ago" format.

Both dates are stored as epoch timestamps in the database.

Here's the code that chooses a format:

https://secure.phabricator.com/diffusion/PHU/browse/master/src/utils/viewutils.php;0135e57181a91e1f342338d62782754e0bd31e59$3-12

Specifically:

if (time was more than 30 days ago) {
  format like "Jul 8, 2014";
} else {
  format like "Sun, Nov 9";
}

This is the intended behavior and not a bug.

Ah, I didn't knew that recent dates are shown in different format.

Sorry, then you're of course right.