Ulysses

General => Off-Topic => Topic started by: iViscosity on October 02, 2016, 07:43:51 AM

Title: Timing system
Post by: iViscosity on October 02, 2016, 07:43:51 AM
I didn't really know how to name this, sorry, but I was wondering where I could find more information about the quote timing system. Like, when you make a quote you'll see a number like '1467087715', or something like that, what do each of those numbers relate to?


Edit: After posting and quoting, I see 'date=1475419431', how is that determined?
Title: Re: Timing system
Post by: Bytewave on October 02, 2016, 09:18:29 AM
The quote part is simply an incremental counter. First you have the topic ID, then you have the message ID. These are simply incremental counters in the database behind the site.
The message ID, you might notice, is quite large for this topic. That's because its ID doesn't care about which post it's on. It only cares about its position relative to the rest as it's in its own database table.

The date part is a bit more complicated, but it's still simple. It's merely what's known as a Unix timestamp, or Epoch time. The Epoch is defined as January 1st,1970 at exactly 0000 hours UTC. The Epoch timestamp is merely the number of seconds since that time, and has become the standard for timestamps (well, there are other formats, but Epoch time is the easiest).
Title: Re: Timing system
Post by: iViscosity on October 02, 2016, 09:20:03 AM
I figured it was seconds, I just didn't know since when. Thanks.
Title: Re: Timing system
Post by: Bite That Apple on October 03, 2016, 11:47:23 AM
Unix is considered the beginning of time for computer clock. Unix itself is not entirely used that much, since a lot of things digital now.
Title: Re: Timing system
Post by: Bytewave on October 03, 2016, 12:35:42 PM
Unix is considered the beginning of time for computer clock. Unix itself is not entirely used that much, since a lot of things digital now.
Uhh... Unix is super common, actually. It's actually a big issue (see the Year 2038 Problem (https://en.wikipedia.org/wiki/Year_2038_problem)). Seconds are considerably easier to work with than a timestamp, and most timestamps are just converted to Unix time when you work with them anyway.
The drawback of Unix time is dates before 1970 will not work properly, but that is typically ignored---why would you work with anything before 1970? There are systems in place if you need dates before that, but Unix time is reliable (if you're using 64-bit numbers to store the timestamp, that is!).
Title: Re: Timing system
Post by: iViscosity on October 03, 2016, 01:02:47 PM
Begin argument in
3...
2...
1...
GO!
Title: Re: Timing system
Post by: JamminR on October 03, 2016, 07:37:11 PM
Epoch != Unix
Epoch == Unix time || POSIX time
Unix == Unix
Title: Re: Timing system
Post by: Bytewave on October 03, 2016, 09:09:53 PM
Epoch != Unix
Epoch == Unix time || POSIX time
Unix == Unix
Even still. Unix is pretty regularly used—see the BSD-based Mac OS X for an example.
/ot
Title: Re: Timing system
Post by: Bite That Apple on October 04, 2016, 05:05:53 PM
I'm not arguing, I was just stating my opinion. I put no research into what I said, so it could not be more of an opinion if I wanted it to be. I could be completely wrong, and unix could still be used for everything (doubtful imo).

As for going before dates of 1970, if I remember, unix can go negative on some systems. Natively is it supposed to go negative, I have no clue.