Converting Player ID to Server Creation Time

Did you know… You can use the player ID to tell when the server was created! More puns can be made too :D

[1]


A player ID, e.g. 6818f4ab0cdad8cd8dc8a970, is the player’s ID. With help from others, the community as a whole unpuzzled the first 8 digits of the ID to be correlated to time.

The first 8 digits, in this example 6818f4ab, are in hexadecimal. This means the values are base-16 values that we need to convert to base-10. How do we do that? See the image below for reference, and I made a guide on bases if you would like to read more.

The equation is x * 16^y repeated for every digit, when x = any digit, and y = the placement of the digit in the number. If you had the number 15 in hex, it is (1 * 16^1) + (5 * 16^0). The answer is 21. Notice how the powers of 16 decrease as you get closer to the ones digit!

Base-16 Alphabet

Normally, a base-10 alphabet is 0123456789. A base-16 alphabet is 0123456789abcdef.

A=10, B=11, C=12, D=13, E=14, and F=15.

Instructions

All you need is this piece of code, a trigger, and a player! Copy the code down, and you should have that piece of code tell you the time of server creation! I simplified 16^y to their corresponding numbers, otherwise, it won’t fit in a single trigger.

The output is counting in seconds from January 1st, 1970. I recommend How long ago was January 1st 1970? | howlongagogo.com to check.

What can I use it for?

Anything time-related! Automated shop rotations, planned future updates, etc.

Can a make a time-joke :pleading_face:
  • Yes.
  • No.
  • You already made one silly goose.
0 voters

If you have any questions, please ask! I don’t bite!


  1. man, I really need to watch my puns ↩︎

20 Likes

This helps a lot tysm Slim :sob:


Jokes aside, this is a nice guide! Checking how long you’ve kept your server running is pretty useful sometimes.

7 Likes

I agree this portion was helpful.

Great guide slim! The auto shop rotation is actually really OP :D

2 Likes

ow my head hurts lol

1 Like

and this everybody, is how slim makes us happy

This is a awesome summary of the Player ID slim!

(cmon slim, give more credit to yourself. After all, you were the one that kicked off this whole thing)
5 Likes

Nice the guide came out. The only question is…OUCH MAN I WAS JUST JOKING!

But uh…all jokes inside [1] impressive guide, and I see potential, I guess the next thing we need is a proper cookie clicker guide to come out.


  1. You really gotta stop with the calculator jokes, that’s a SIN ↩︎

2 Likes

It felt like I rushed it because it is shorter than my other guides. The only thing I’m concerned about is if I explained it well or the pictures explained it well.

Why are you guys saying jokes aside? I only timed one. :sob:


@notyoyo

1 Like

Just one question (unless you I missed the answer).
Where in the blockcode did you convert the letters?

1 Like

[EDIT] This doesn’t work because there is no get index of block in gimkit. I’m keeping it up so the later conversation makes sense.

You can make this into a for loop for 35 extra memory and solve the problem Apollo found for 10 more memory. You make a counter that starts at 1 and each time the block runs, you increment it by 1 (I just realized that you don’t need the counter. Handle that property in the block). The counter is connected to a property. This counter/property encodes the digit that we’re currently converting. So you do the take letter operation on the id using the counter number. To convert from letter to number, use another text property that contains: “0123456789abcdef”. Use the get index of on the letter and subtract 1, and that’s the hexadecimal digit in base 10. Then multiply by the (length - current digit #)^16 and add that to a property (so I guess it’s actually 30 more memory). That property is the real thing in base 10.

1 Like

oh yeah
ig I didn’t have to because it’s on the same map as my custom base calculator, but I have properties for 1 = 1, 2 = 2,...a = 10,...f = 15. Notice how I use the “get property” block because it gets the property called a and it returns the value 10.

@SlimExtraterrestrial We gotta think of other uses since your “uses” are sorta not possible and or just worth the time in this time of Gimkit Development. We do not have the capability to have around the clock games since a new server runs per host

Slim’s method for extracting the server creation time using the player ID actually does have potential uses in Gimkit, even if it’s not for around-the-clock games. By determining the server’s start time, you can implement time-based logic, such as scheduling events or tracking time-sensitive game states. For example, you could create a game that changes its state or unlocks new content after a certain amount of time has passed since the server started.


TLDR:
Slim’s method can still be useful for games that need to track time within a single session or plan events relative to the server’s start time.

3 Likes

Yes we do.
As long as we fetch the Gimkit player id everyhost,the game will know the time.


did you read?

1 Like

I mean like a server that runs the same timer or so on all servers like imagine a big update countdown the timer would only start when the server starts

Yeah, that is possible to some extent. The hexadecimal value is converted into a decimal value. If it is greater than a certain time, let’s say, New Year 2026, it would be 1,767,225,600 seconds. That is 6955B900 in hexadecimal value.

The first 8 characters in the host ID is the server creation time.

1 Like

hey, i’m wondering if you can see what’s wrong with this coding.
(and thanks)

Shouldn’t this be a different topic if it’s for help?
Ik it’s about this Community Made Guides but it’s happened in other posts sooooo….

actually, it is related to this topic (the chunk of code). I just wanted to see if someone could check it for mistakes.