- check_circle Advancements
- check_circle Functions
- check_circle Recipes
- 7,964 views, 2 today
- 808 downloads, 0 today
- 143
- 118
- 49
Required Resource Pack
922
Real Time Link |
This datapack links the time in your Minecraft world to your real time (if on multiplayer, the time in the server's timezone), down to the nearest minute. It is relatively optimised, using the latest features in 1.19.4 to allow parsing strings.
As opposed to other similar datapacks, this one minimises how often it does weird technical things, making it quite optimised, but there’s room for me to improve on it. You won't notice the time going by, as it updates super smoothly :D
It also adds a new item - the Digital Clock, which shows the current time in HH:MM.
IMPORTANT NOTES
This datapack only works in versions 1.19.4 and above!
This datapack only works if command blocks are enabled.
The resource pack is optional - you only need to use it if you want to use the Digital Clock item
Digital Clock
The Digital Clock shows your current time/the time of the server. It is accurate (to the time of the server) to within two seconds.
You can craft it with the recipe shown, or use the function /function give:clock
The digital clock requires the resource pack to use it, but it is not required for the real time linking, or any other features.
Time Zone Offset
If your server that the datapack is installed on is hosted in a timezone which is, say, 4 hours behind your time zone, then you can offset the time. To do this, run
/scoreboard players set .TZ_OFFSET rtime offset
where offset is a number from -11 to 14. If the server is 4 hours behind, you would want to offset the time to be 4 hours ahead of the server, so you would set it to 4.- This only affects the real-time link, not the digital clock item

How it works
1. I run an invalid command in a command block. The LastOutput NBT of the command block always contains the current time.
2. Using the new string parsing features in 1.19.4, I get the hour and minute from the command block and store it as two strings.
3. Every minute, I
- Get the hour, and set the current in-game time to (1000 * hour) (yep, it’s hardcoded for 24 possible values)
- Get the minute, and add on (16.6666 * minute) to the newly set in-game time.
2. Using the new string parsing features in 1.19.4, I get the hour and minute from the command block and store it as two strings.
3. Every minute, I
- Get the hour, and set the current in-game time to (1000 * hour) (yep, it’s hardcoded for 24 possible values)
- Get the minute, and add on (16.6666 * minute) to the newly set in-game time.
Known Bugs (read before complaining in comments please)
- phantoms do be weird
Want a Minecraft server, with a 25% discount? Click Here!![]() |
Compatibility | Minecraft 1.19 |
Tags |
3 Update Logs
1.2 : by Silabear 05/02/2023 1:51:41 pmMay 2nd, 2023
Added time zone offset option.
(this will be the last update for a while dw)
(this will be the last update for a while dw)
LOAD MORE LOGS
5921354
119
Create an account or sign in to comment.
I MUST POSSESS IT.
If you can sleep, and it skips night, is there a way to disable this?
I haven’t tested this on realms (because I don’t have a realm to test this on). If you end up testing it, lemme know if it works or not.
Anyway to change the time manually? if not that's alright, its only one hour behind which is close enough to be honest.
Ill check again in a couple hours time to see if it turns night around evening.
Thanks for the information! I guess realms run in UTC. Useful to know :D