HomeJavaDatapacksGet SysTime
Get SysTime

GetSysTime

Bring the real-world clock into Minecraft commands.

GetSysTime is a server-side data pack that reads the local time from the machine running your world and exposes the hour, minute, and second through a scoreboard and command storage. Use it to build clocks, scheduled events, daily rewards, time-based mechanics, or anything else that needs the real time of day.

No mod or resource pack is required.

Features

On a dedicated server, GetSysTime reads the server host's clock and time zone, not each player's local time.

Installation

  1. Download the version of GetSysTime that matches your Minecraft version.
  2. Place the downloaded .zip file in your world's datapacks folder.
  3. Join the world or run /reload if it is already open.
  4. Stand in a safe location inside an always-loaded chunk, preferably near the world spawn, then run:
/function getsystime:set

The setup function places a repeating command block at your position and a marker inside it. The block at that position will be replaced. Running the setup function again safely replaces the previous GetSysTime installation.

Dedicated servers must have command blocks enabled in server.properties:

enable-command-block=true

Usage

Whenever you need the current time, run:

/function getsystime:get

The following fake players in the GetSysTime objective are updated with numeric values:

Score holder Value
$Hour Current hour
$Minute Current minute
$Second Current second

For example, you can read them directly with:

/scoreboard players get $Hour GetSysTime
/scoreboard players get $Minute GetSysTime
/scoreboard players get $Second GetSysTime

Or display the objective while testing:

/scoreboard objectives setdisplay sidebar GetSysTime

The raw time is also available at getsystime:values input. On snapshot 23w31a and newer, the individual time fields are stored under getsystime:values time as well.

GetSysTime updates these values only when getsystime:get is called, so other data packs can decide how often they need to refresh the time.

Uninstallation

Before deleting the data pack, run:

/function getsystime:uninstall

This removes the command block, marker, scoreboard objective, and storage data created by GetSysTime. You can then remove the .zip file from the world's datapacks folder.

Important notes

Credits and license

Created by EclairDeFeu360.

GetSysTime is licensed under CC BY-SA 4.0. By downloading the data pack, you agree to its license.

Support the creator

Quick facts

Install steps are the general flow for this file type — see the MC Java Mods guides for the full walkthrough.

Verified by MCModsHub

These come from our own check of the pack file, not from the source page.

Explore more