Jump to content


Photo

Times displayed as Unix time?


  • Please log in to reply
5 replies to this topic

#1 tomjol

tomjol
  • Member

  • 883 posts
  • Joined: October 11

Posted 17 June 2016 - 10:31

On an article page, in the "Latest" column to the right of the article, there's a list of news items.

 

A time is displayed, representing "this was posted X hours ago". Looking at one of these pages now, I've got "45m" on one article, "1hr" on another, etc.

 

A few minutes ago, and I stress I've only seen this the once, in place of these meaningful times was what appeared to be a Unix time value. I don't know in what layer these are being translated (maybe it's in the browser?) but it seems there's a window somewhere that can lead to them not being translated. Refreshing the page put them back to meaningful times.

 

ETA: Seems it might be on the live event page (Baku practice in this case), see screenshot:

 

laQ4xOr.png


Edited by tomjol, 17 June 2016 - 10:46.


Advertisement

#2 Grayson

Grayson
  • Autosport digital product manager

  • 3,498 posts
  • Joined: July 08

Posted 17 June 2016 - 10:53

That's an odd little bug...

 

As you've guessed, we store these as Unix time and they then get translated into how long ago they were. I'll have to check whether that's done in the browser or on our end, but either way it looks like the bit which translates it hasn't kicked in here.

 

Thanks for reporting this, I'll ask our developers to take a look!



#3 tomjol

tomjol
  • Member

  • 883 posts
  • Joined: October 11

Posted 17 June 2016 - 15:33

Beats reporting bugs in my own stuff  :rotfl:



#4 Grayson

Grayson
  • Autosport digital product manager

  • 3,498 posts
  • Joined: July 08

Posted 08 July 2016 - 13:41

I know it's only a minor issue, but we're working on a fix for this.

 

If anyone's interested, the Unix time is baked into the page and we have a small piece of Javascript which subtracts it from whatever the system time on your computer is as you view the page. If everything loads slowly then there might be a gap between the page loading and this piece of Javascript loading, which means that you'll see the Unix time.

 

We're going to bake something in which will wait until the time has been translated before showing it at all. I got excited about loading some sort of Javascript effect or animation as the time appears, but our designer will come up with something much more classy and professional than that...



#5 pRy

pRy
  • Member

  • 26,575 posts
  • Joined: March 99

Posted 08 July 2016 - 20:01

Ok seeing as you went into detail I've a question. Why ask the users browser for the current Unix time? Surely you could just get that at the server side whist serving the page.



#6 tomjol

tomjol
  • Member

  • 883 posts
  • Joined: October 11

Posted 09 July 2016 - 09:43

Time-based system calls can be remarkably slow in my experience, so they probably don't want that overhead.