Bungie.net Community
This topic has moved here: Subject: Timestamps should show relative time instead
  • Subject: Timestamps should show relative time instead
Subject: Timestamps should show relative time instead

We need a madness to the method!

Posted by: Achronos
I think it would be much more useful if timestamps were displayed in the browser's local time using a little javascript slight of hand.

Of course, sometimes things like that get cut from feature work.
Does Mr. Achronos want us to write the JS for him?

Let me think here....

How about each post gets a timestamp attached to them, using milliseconds since the Epoch? And then you can compare the time the page was loaded with the timestamp. This gives you a certain amount of milliseconds since the post was added.

With milliseconds, you can convert to seconds, minutes, hours, days.

[Edited on 10.22.2011 11:18 PM PDT]

  • 10.22.2011 11:08 PM PDT

if(!now){when();}
Bungie Favorite Author : Iris::1
Map

To be honest, I don't think JavaScript is the way to go on this issue. Granted, it may take a fraction more processing power, but this issue should be handled server side. But then again, I'm not familar with B.net's setup nor capacity. For all I know, their system is maxed out.

Personally, I'd like to see a revamp of the entire forum formating.
Posted by: Erikster
Posted by: Achronos
I think it would be much more useful if timestamps were displayed in the browser's local time using a little javascript slight of hand.

Of course, sometimes things like that get cut from feature work.
Does Mr. Achronos want us to write the JS for him?

Let me think here....

How about each post gets a timestamp attached to them, using milliseconds since the Epoch? And then you can compare the time the page was loaded with the timestamp. This gives you a certain amount of milliseconds since the post was added.

With milliseconds, you can convert to seconds, minutes, hours, days.

  • 10.22.2011 11:26 PM PDT

We need a madness to the method!

Posted by: Malfar
To be honest, I don't think JavaScript is the way to go on this issue. Granted, it may take a fraction more processing power, but this issue should be handled server side. But then again, I'm not familar with B.net's setup nor capacity. For all I know, their system is maxed out.

Personally, I'd like to see a revamp of the entire forum formating.
I'm guessing ASP.NET with C# code-behind.

I'm not super familiar with web development, much less making a forum website, but I'm guessing Achronos stores all of these posts in a SQL database. Using System.Data.SqlClient he can probably call any information in a post. I imagine the table would have the Username, Post, Thread# or post#, and the time it was posted (and edited I guess).

Call those values, turn them into DateTimes and then subtract the current time from the post time using TimeSpan... hmmm it gives a weird format.

[Edited on 10.22.2011 11:46 PM PDT]

  • 10.22.2011 11:40 PM PDT

DateTime postDate = new Date(2011, 10, 23, 50, 0, 0);
Timespan ts = postDate.ToUniversalTime() - new Date(1970, 1, 1);

//ts.TotalMilliseconds will return the epoch

  • 10.22.2011 11:52 PM PDT

We need a madness to the method!

Posted by: dazarobbo
DateTime postDate = new Date(2011, 10, 23, 50, 0, 0);
Timespan ts = postDate.ToUniversalTime() - new Date(1970, 1, 1);

//ts.TotalMilliseconds will return the epoch
Beat me to it. :)

Wait.

DateTime postDate = new DateTime(2011, 10, 19);
TimeSpan span = DateTime.Now - postDate;
double seconds = span.TotalSeconds;
Gives you the seconds between posts right there instead of using epoch.

[Edited on 10.23.2011 12:04 AM PDT]

  • 10.22.2011 11:57 PM PDT

"We live in a special time; the only time where we can observationally verify that we live in a very special time" - Lawrence Krauss.

I was a finalist :P

Better for a system to calculate how long it has been since the last post of a thread, rather than using my own noggin ;)

I guess it helps with people living in different timezones (to avoid what confusion there is) and it wouldn't be too difficult to implement into the site.

[Edited on 10.22.2011 11:58 PM PDT]

  • 10.22.2011 11:58 PM PDT

We're concerned

Cafe|MLP: FiM|Bnet Regulars|FCAW
Got a question, comment, or concern? PM me.

If not that then at least give us the ability to change the time zone

I hate it showing PDT when I am on EST

[Edited on 10.23.2011 12:03 AM PDT]

  • 10.22.2011 11:59 PM PDT

Posted by: Erikster
Wait.

DateTime postDate = new DateTime(2011, 10, 19);
TimeSpan span = DateTime.Now - postDate;
double seconds = span.TotalSeconds;
Gives you the seconds between posts right there instead of using epoch.
That will work for any "x seconds ago" kinds of timestamps, but for Javascript to be able to do anything with it (ie. convert it to local time) you'll need to use the epoch.

http://developer.mozilla.org/en/JavaScript/Reference/Global_O bjects/Date#Parameters

  • 10.23.2011 12:08 AM PDT
  •  | 
  • Exalted Legendary Member

Exalted Unexplainable Member

I'm actually a Washingtonian, so I'm in the same time-zone. Trust me it isn't that good.

Posted by: snipe champpppp
If not that then at least give us the ability to change the time zone

I hate it showing PDT when I am on EST

  • 10.23.2011 12:11 AM PDT

We need a madness to the method!

Posted by: dazarobbo
Posted by: Erikster
Wait.

DateTime postDate = new DateTime(2011, 10, 19);
TimeSpan span = DateTime.Now - postDate;
double seconds = span.TotalSeconds;
Gives you the seconds between posts right there instead of using epoch.
That will work for any "x seconds ago" kinds of timestamps, but for Javascript to be able to do anything with it (ie. convert it to local time) you'll need to use the epoch.

http://developer.mozilla.org/en/JavaScript/Reference/Global_O bjects/Date#Parameters
I thought the goal was the "X seconds ago" information. If a post was made three hours ago in Washington it was also made three hours ago in Maryland. (Also, I'm in C# mode going off of the server-side suggestion).

[Edited on 10.23.2011 12:14 AM PDT]

  • 10.23.2011 12:13 AM PDT

Miscommunication then ;)

As you mentioned, it would be pointless to calculate the epoch for Javascript if you're going to use a relative timestamp which is going to apply in all time zones.

The only reason I started talking about using the epoch is because Achronos mentioned local dates using Javascript - he totally stole that idea from me too ;).

  • 10.23.2011 1:14 AM PDT

There comes a time in every mans life... and that time is not now.

I am all for this idea.

  • 10.23.2011 1:19 AM PDT

-From the unusual mind of TheUsualPsycho

It appears Mr. Tom approves. So do I.
You know who you are, Tom...

  • 10.23.2011 1:34 AM PDT

<_QuAnTuM_>
What's your talent?
Posted by: DabilahroNinja
I can see through windows.

Posted by: WinyPit82
Like they always say, "You mess with the Helix Nebula, you get the WinyPit82."

Hi there! be sure to click that homepage link!

That's alright, but what I really want is the Time location, instead of pacific time always being everywhere...

By that I mean I want to see the time as GMT or BST. Not Eastern Pacific time.

  • 10.23.2011 3:20 AM PDT

From Cyro to Meta

Oh. I like it.

  • 10.23.2011 3:28 AM PDT

_____ ____(˜˜˜||˜˜˜˜||˜˜˜˜˜)_∏______
--------____.`=====.-.~:_______\___|==============[oo
|_|||___/___/_/~```|_|_|_|``(o)----------<)
Have Fai7h

My old Halo account: karsttheninja99

I like it OP

  • 10.23.2011 7:28 AM PDT

Key


Posted by: thenewxegk
That's alright, but what I really want is the Time location, instead of pacific time always being everywhere...

By that I mean I want to see the time as GMT or BST. Not Eastern Pacific time.
I guarantee you that you will never ever see any time in Easter Pacific Time... Mainly because it's not a thing. ;)

  • 10.23.2011 7:37 AM PDT

The Stig is dead to me
-Carrick

Sounds like a good plan.

  • 10.23.2011 7:37 AM PDT

Herp
Derp.

Sounds like a good idea.

  • 10.23.2011 9:40 AM PDT

Am I supposed to write something funny here?

I want to see local time on the timestamps!

  • 10.23.2011 11:22 AM PDT

I've been thinking the same thing lately, it would be nice. I know how to interpret it.
t - 3= Current time.

  • 10.23.2011 11:27 AM PDT

We need a madness to the method!

Posted by: dazarobbo
The only reason I started talking about using the epoch is because Achronos mentioned local dates using Javascript - he totally stole that idea from me too ;).
Haha! Thanks for educating me about Javascript's TimeSpan.

  • 10.23.2011 1:44 PM PDT

Foday Church
>He wonders why we're here...
"Magic Touch" Received 10/29/11 due to this thread
Twitta: @St3p_R1ppin

I think its should be depending on the person's time zone

  • 10.23.2011 8:12 PM PDT

We were somewhere around Barstow...

Totally agree with OP. It's annoying for anyone outside the states.

  • 10.23.2011 8:31 PM PDT

Posted by: Erikster
Haha! Thanks for educating me about Javascript's TimeSpan.
Javascript doesn't actually have a native TimeSpan type, only Date. .NET does (and Mono if you want to go there), but people have been definitely been able to "fake it" in Javascript.

  • 10.23.2011 11:59 PM PDT