What is meta? ×
Meta Stack Exchange is where users like you discuss bugs, features, and support issues that affect the software powering all 133 Stack Exchange communities.

I've recently joined Data.SE, and seen this:

member for: -56 second

-55, -54, and counting… it reached 0, but then it started over from -59!
It seems I'm not alone with this problem

share|improve this question
    
can not find this in the code any more, I think we fixed it ... ping me if it is not. –  waffles Feb 3 '12 at 0:26

3 Answers 3

up vote 6 down vote accepted

From a quick look, I suspect that this due to the fact that the user creation time is specified as DateTime.UtcNow, but the offset on that page is calculated using DateTime.Now. Since the data.SE server is hosted in Oregon, there's a several-hour period during which the registration time is ahead of the server's current time. This causes problems with the TimeTaken() method, which expects the interval to always be positive.

Since the TimeTaken() method only checks to see if days, hours, and minutes are positive when choosing whether or not to display them, you'll see a fluctuating negative seconds value until the server time has passed the UTC time that your account was created at.

Presumably changing the view offset to DateTime.UtcNow would correct things, though I'm unable to verify at the moment that this is actually the problem. Once I'm able, I'll test to see if this is the case, and if so I'll try and get a patch ready.

share|improve this answer

I did an independent analysis and came to the same conclusion as Tim did.

The problem is the combination of:

  1. When a new user account is created, the creation date is recorded in UTC time, and
  2. The user account page displays the time difference between the creation date and the current time, the latter of which was incorrectly using the server's local time, instead of the UTC time

So in fact, even if a given user currently has a positive number displayed in the member for field, it's still incorrect. This change will also fix that problem.

I've patched this up and notified @waffles.

share|improve this answer
3  
Ah, I knew there was something I forgot to do when I got home. Good stuff! –  Tim Stone May 1 '11 at 20:46
    
This should be live now (can't really tell until someone registers a new account). –  Jon Seigel May 3 '11 at 17:37
    
Still broken for me. –  PleaseStand May 8 '11 at 16:36
    
@Ple: waffles sent me a reply e-mail, so I assumed incorrectly, I guess. The change is checked into the trunk of the project, so I'm not sure what happened. –  Jon Seigel May 8 '11 at 18:26

The first problem is probably an issue of time synchronization across different servers.

share|improve this answer

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .