{"id":156540,"date":"2026-06-09T15:36:01","date_gmt":"2026-06-09T12:36:01","guid":{"rendered":"https:\/\/vpesports.com\/minecraft\/mods\/timelib\/"},"modified":"2026-06-09T15:36:01","modified_gmt":"2026-06-09T12:36:01","slug":"timelib","status":"publish","type":"mod","link":"https:\/\/vpesports.com\/minecraft\/mods\/timelib\/","title":{"rendered":"TimeLib"},"content":{"rendered":"<p># \u26a0 ATTENTION \u26a0<br \/>\n(Sep 27, 2025) I found few **major problems with TimeLib** that make it unreliable for certain usecases. Please **read through these carefully** and assess for yourself whether you want to use TimeLib. Once a way is found or added by Mojang to fix these issues, **I will keep supporting TimeLib again**. As of me writing this, **TimeLib v2.3.1** is the latest release.<\/p>\n<p>**TimeLib is NOT permanently discontinued, it will come back once all is sorted out!**<br \/>\nI will post updates to the situation here, as well as the MinecraftCommands Discord server (in #resources).<\/p>\n<p>## Fundamental (currently) unfixable Problems:<br \/>\nBecause of these issues, for TimeLib to keep working as expected, the user would need to **manually** confirm \/ adjust the date **every time the world reloads**. That breaks the point of TimeLib, which is why I need time to think \/ wait until Mojang makes it possible to mitigate these issues.<br \/>\n&#8211; **\u26a0** If the player head profile (which includes a timestamp) is **older than 24 hours** (which can happen due to caching and cannot be detected), it&#8217;s **impossible to automatically detect the date accurately**<br \/>\n&#8211; **\u26a0** Since 1.21.9, the unix timestamp can only be retrieved from online players, meaning **TimeLib cannot update the date while nobody&#8217;s online**, potentially breaking packs that rely on it (Note: It only needs the player to synchronize the date initially. Until the time is desynced, it keeps working even when nobody&#8217;s online)<br \/>\n&#8211; The `PausedTicks` score that contains the number of ticks that the game has been paused\/frozen for only works if at least one player is online from start to finish. If everyone leaves (doesn&#8217;t have to be at the same time) while the game is frozen, or nobody was online in the first place, the **stored value in `PausedTicks` is not reliable**<br \/>\n  &#8211; The same problem makes it so **freezing the game for 24h+ makes the day not increment** (because there&#8217;s no way to tell how much time has passed if nobody&#8217;s online)<br \/>\n&#8211; Because of daylight savings, the **unix timestamp** (which is expected to increase monotonously) could go backwards by 1h, potentially **breaking packs that necessarily rely on the monotony**. Being unable to detect timezones &#038; daylight savings automatically, this cannot be counteracted without manual player input<br \/>\n## Other big known fixable bugs \/ oversights:<br \/>\n**I will fix these issues** once I get to them. In the meantime, I put them here so you&#8217;re aware of them. While these are not all known issues, these are the major ones.<br \/>\n&#8211; **\u26a0** An oversight makes it possible under rare circumstances for the date to be 1 day ahead of what it should be<br \/>\n&#8211; **\u26a0** An oversight prevents the date from incrementing after more than 1 day has passed since the server \/ client was running without reboots<br \/>\n&#8211; **\u26a0** While the time is incorrect (because it takes a bit to retrieve the necessary data), TimeLib does not indicate that the time is not synchronized yet, potentially breaking packs that try to grab data when it&#8217;s not ready<br \/>\n# TimeLib<br \/>\nA Minecraft Data Pack library that lets you get the real life date &#038; time ingame. For inquiries, please contact **@silicatYT** on Discord.<\/p>\n<p>Download: Modrinth<br \/>\nReport bugs: GitHub<\/p>\n<p>## Features<br \/>\n&#8211; Provides the real life date &#038; time with tick accuracy:<br \/>\n  &#8211; Year, Month, Day, Week Day, Hour, Minute, Second &#038; the Unix Timestamp<br \/>\n&#8211; Provides the current tickrate<br \/>\n&#8211; Detects pausing the game &#038; the pause duration (e.g. `\/tick freeze` or singleplayer)<br \/>\n&#8211; Convert any Unix Timestamp into a date &#038; time<br \/>\n&#8211; Supports different timezones &#038; daylight savings time<br \/>\n&#8211; Supports lag, different tick rates &#038; pausing<br \/>\n&#8211; High efficiency<\/p>\n<p>## How to use<br \/>\nTimeLib automatically keeps track of the date &#038; time for you. For that to work, you first need to configure the settings to your personal taste. To access the settings, click the message that appears in chat after reloading, or manually run `\/function timelib:util\/settings`.<br \/>\n### &rarr; Settings<br \/>\n&#8211; `Command Block Offset`: This is required to offset the time difference between the UTC timezone and your system time. If daylight savings change, this setting needs to be adjusted to ensure that the date calculation works properly.<br \/>\n  &#8211; **Example:** UTC (7pm), System clock (8pm) &rarr; Use 1h<br \/>\n&#8211; `Timezone Offset`: Use this to change the displayed time.<br \/>\n  &#8211; **Example:** 8pm + 1h offset &rarr; 9pm<br \/>\n### &rarr; Get the real life date &#038; time<br \/>\nThe values for Year, Month, Day, Week Day, Hour, Minute, Second &#038; the Unix Timestamp are all stored inside the player `#TimeLib`, with each value having its own scoreboard objective:<br \/>\n&#8211; `TimeLib.Year, TimeLib.Month, TimeLib.Day, TimeLib.WeekDay, TimeLib.Hour, TimeLib.Minute, TimeLib.Second &#038; TimeLib.UnixTime`<\/p>\n<p>Additionally, string versions (with leading 0s) of the date and daytime are stored in the `timelib:date` and `timelib:daytime` storages.<\/p>\n<p>### &rarr; Events<br \/>\n&#8211; `#timelib:date_changed`: Function tag that gets executed whenever the date changes<br \/>\n&#8211; `#timelib:daytime_changed`: Function tag that gets executed whenever the daytime changes<br \/>\n&#8211; `#timelib:game_unpaused`: Function tag that gets executed whenever the game unpauses<br \/>\n  &#8211; The `#TimeLib TimeLib.PausedTicks` scoreboard holds the number of ticks the game has been paused for<\/p>\n<p>### &rarr; Get the tickrate<br \/>\nThe tickrate updates once per second and can be read from the `TimeLib.Tickrate` scoreboard objective.<\/p>\n<p>### &rarr; Convert any Unix Timestamp into a date &#038; time<br \/>\n**Note:** The output date &#038; time are in the UTC timezone, as daylight savings time cannot be properly accounted for.<\/p>\n<p>&#8211; Set the `#TimeLib.Input TimeLib.UnixTime` score as the input.<br \/>\n&#8211; Run `\/function timelib:util\/unix_timestamp_to_date`.<br \/>\n&#8211; The output values will be stored inside the `#TimeLib.Output TimeLib.?` scores, as well as the `timelib:output` data storage.<\/p>\n<p>## How it works<br \/>\n&#8211; TimeLib combines the with Base64 encoded Unix Timestamp inside player heads with the daytime information inside command block outputs to calculate the current date &#038; time.<br \/>\n&#8211; To get the tickrate, TimeLib counts the number of ticks between each daytime change.<br \/>\n&#8211; The pause detection uses the `minecraft.custom:minecraft:total_world_time` scoreboard objective, which increments every tick even while the game is paused.<\/p>\n<p>Additional logic is used to ensure optimal results, good performance and accuracy.<\/p>\n<p>## Credit<br \/>\nFrom CMDred:<br \/>\n&#8211; **SilicatYT:** TimeLib<br \/>\n&#8211; **BananaRedPanda:** Base64 Decoder &#038; Help<\/p>\n<p>## Good to know<br \/>\n&#8211; TimeLib requires an internet connection.<br \/>\n&#8211; Getting the tickrate does not utilize worldborder shenanigans.<br \/>\n&#8211; If your Data Pack uses a forceloaded chunk at `29999999 29999999` in the overworld, there may be collision.<br \/>\n&#8211; TimeLib (2.3.0 and newer) uses the lantern load library that lets you check for dependencies. If you follow its conventions:<br \/>\n  &#8211; `#TimeLib load.status`: 1 if TimeLib is installed, otherwise unset<br \/>\n  &#8211; `#TimeLib.Version load.status`: Release-specific number<br \/>\n&#8211; Upgrade to a newer release:<br \/>\n  &#8211; For TimeLib releases **before 2.3.0**: `\/function timelib:uninstall`, then replace your current TimeLib version with the new one, then `\/reload` to install the new version<br \/>\n  &#8211; For upgrading from **release 2.3.0 or later** to a newer release, simply replace the old datapack with the new one<br \/>\n&#8211; (v2.3.0+) TimeLib **throws errors and stops working if multiple different releases are installed simultaneously**. This extends to trying to call utility functions.<br \/>\n  &#8211; Similar behaviour occurs when trying to run utility functions after running `\/function timelib:uninstall`<\/p>\n<p>## License<br \/>\nAs per the MIT License, you are allowed to redistribute, modify and use TimeLib as long as we are credited for the original work.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Get the real life date &#038; time tick-perfectly and efficiently!<\/p>\n","protected":false},"featured_media":156541,"template":"","meta":{"_minecraft_slug":"timelib","_minecraft_project_id":"zhrv5yZg","_minecraft_author":"SilicatYT","_minecraft_license":"MIT","_minecraft_downloads":3941,"_minecraft_follows":26,"_minecraft_client_side":"optional","_minecraft_server_side":"required","_minecraft_storage_type":"zip","_minecraft_archive_name":"timelib.zip","_minecraft_size_bytes":372127,"_minecraft_version_count":19,"_minecraft_updated_at":"2026-05-16T01:41:31.692749Z","_minecraft_date_created":"2023-11-22T03:00:37.967918Z","_minecraft_date_modified":"2025-07-28T13:38:43.566122Z","_minecraft_project_url":"https:\/\/modrinth.com\/mod\/timelib","_minecraft_icon_attachment_id":156541,"_minecraft_imported_at":"2026-06-09T12:36:01+00:00","_minecraft_import_hash":"ab860ca7a68fbf2e8971c2ae541efeba","_minecraft_versions":"","_minecraft_links":"","_minecraft_gallery":"","_minecraft_api_metadata":""},"mod_category":[84,873,92],"mod_loader":[86],"minecraft_version":[93,728,94,101,102,62,37,73,74,38,78,79,80,81,724],"class_list":["post-156540","mod","type-mod","status-publish","has-post-thumbnail","hentry","mod_category-datapack","mod_category-library","mod_category-utility","mod_loader-datapack","minecraft_version-1-20-3","minecraft_version-1-20-3-pre3","minecraft_version-1-20-4","minecraft_version-1-20-5","minecraft_version-1-20-6","minecraft_version-1-21","minecraft_version-1-21-1","minecraft_version-1-21-2","minecraft_version-1-21-3","minecraft_version-1-21-4","minecraft_version-1-21-5","minecraft_version-1-21-6","minecraft_version-1-21-7","minecraft_version-1-21-8","minecraft_version-23w45a"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.6 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>TimeLib - Minecraft<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/vpesports.com\/minecraft\/mods\/timelib\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"TimeLib - Minecraft\" \/>\n<meta property=\"og:description\" content=\"Get the real life date &amp; time tick-perfectly and efficiently!\" \/>\n<meta property=\"og:url\" content=\"https:\/\/vpesports.com\/minecraft\/mods\/timelib\/\" \/>\n<meta property=\"og:site_name\" content=\"Minecraft\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data1\" content=\"6 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/vpesports.com\\\/minecraft\\\/mods\\\/timelib\\\/\",\"url\":\"https:\\\/\\\/vpesports.com\\\/minecraft\\\/mods\\\/timelib\\\/\",\"name\":\"TimeLib - Minecraft\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/vpesports.com\\\/minecraft\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/vpesports.com\\\/minecraft\\\/mods\\\/timelib\\\/#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/vpesports.com\\\/minecraft\\\/mods\\\/timelib\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/vpesports.com\\\/minecraft\\\/wp-content\\\/uploads\\\/2026\\\/06\\\/timelib-icon-88f4474ef9a23fa430fc98566f10b049cfd3c0c1.png\",\"datePublished\":\"2026-06-09T12:36:01+00:00\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/vpesports.com\\\/minecraft\\\/mods\\\/timelib\\\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/vpesports.com\\\/minecraft\\\/mods\\\/timelib\\\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/vpesports.com\\\/minecraft\\\/mods\\\/timelib\\\/#primaryimage\",\"url\":\"https:\\\/\\\/vpesports.com\\\/minecraft\\\/wp-content\\\/uploads\\\/2026\\\/06\\\/timelib-icon-88f4474ef9a23fa430fc98566f10b049cfd3c0c1.png\",\"contentUrl\":\"https:\\\/\\\/vpesports.com\\\/minecraft\\\/wp-content\\\/uploads\\\/2026\\\/06\\\/timelib-icon-88f4474ef9a23fa430fc98566f10b049cfd3c0c1.png\",\"width\":64,\"height\":64},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/vpesports.com\\\/minecraft\\\/mods\\\/timelib\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/vpesports.com\\\/minecraft\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Mods\",\"item\":\"https:\\\/\\\/vpesports.com\\\/minecraft\\\/mods\\\/\"},{\"@type\":\"ListItem\",\"position\":3,\"name\":\"TimeLib\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/vpesports.com\\\/minecraft\\\/#website\",\"url\":\"https:\\\/\\\/vpesports.com\\\/minecraft\\\/\",\"name\":\"Minecraft\",\"description\":\"\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/vpesports.com\\\/minecraft\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"TimeLib - Minecraft","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/vpesports.com\/minecraft\/mods\/timelib\/","og_locale":"en_US","og_type":"article","og_title":"TimeLib - Minecraft","og_description":"Get the real life date & time tick-perfectly and efficiently!","og_url":"https:\/\/vpesports.com\/minecraft\/mods\/timelib\/","og_site_name":"Minecraft","twitter_card":"summary_large_image","twitter_misc":{"Est. reading time":"6 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/vpesports.com\/minecraft\/mods\/timelib\/","url":"https:\/\/vpesports.com\/minecraft\/mods\/timelib\/","name":"TimeLib - Minecraft","isPartOf":{"@id":"https:\/\/vpesports.com\/minecraft\/#website"},"primaryImageOfPage":{"@id":"https:\/\/vpesports.com\/minecraft\/mods\/timelib\/#primaryimage"},"image":{"@id":"https:\/\/vpesports.com\/minecraft\/mods\/timelib\/#primaryimage"},"thumbnailUrl":"https:\/\/vpesports.com\/minecraft\/wp-content\/uploads\/2026\/06\/timelib-icon-88f4474ef9a23fa430fc98566f10b049cfd3c0c1.png","datePublished":"2026-06-09T12:36:01+00:00","breadcrumb":{"@id":"https:\/\/vpesports.com\/minecraft\/mods\/timelib\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/vpesports.com\/minecraft\/mods\/timelib\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/vpesports.com\/minecraft\/mods\/timelib\/#primaryimage","url":"https:\/\/vpesports.com\/minecraft\/wp-content\/uploads\/2026\/06\/timelib-icon-88f4474ef9a23fa430fc98566f10b049cfd3c0c1.png","contentUrl":"https:\/\/vpesports.com\/minecraft\/wp-content\/uploads\/2026\/06\/timelib-icon-88f4474ef9a23fa430fc98566f10b049cfd3c0c1.png","width":64,"height":64},{"@type":"BreadcrumbList","@id":"https:\/\/vpesports.com\/minecraft\/mods\/timelib\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/vpesports.com\/minecraft\/"},{"@type":"ListItem","position":2,"name":"Mods","item":"https:\/\/vpesports.com\/minecraft\/mods\/"},{"@type":"ListItem","position":3,"name":"TimeLib"}]},{"@type":"WebSite","@id":"https:\/\/vpesports.com\/minecraft\/#website","url":"https:\/\/vpesports.com\/minecraft\/","name":"Minecraft","description":"","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/vpesports.com\/minecraft\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"}]}},"_links":{"self":[{"href":"https:\/\/vpesports.com\/minecraft\/wp-json\/wp\/v2\/mod\/156540","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/vpesports.com\/minecraft\/wp-json\/wp\/v2\/mod"}],"about":[{"href":"https:\/\/vpesports.com\/minecraft\/wp-json\/wp\/v2\/types\/mod"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/vpesports.com\/minecraft\/wp-json\/wp\/v2\/media\/156541"}],"wp:attachment":[{"href":"https:\/\/vpesports.com\/minecraft\/wp-json\/wp\/v2\/media?parent=156540"}],"wp:term":[{"taxonomy":"mod_category","embeddable":true,"href":"https:\/\/vpesports.com\/minecraft\/wp-json\/wp\/v2\/mod_category?post=156540"},{"taxonomy":"mod_loader","embeddable":true,"href":"https:\/\/vpesports.com\/minecraft\/wp-json\/wp\/v2\/mod_loader?post=156540"},{"taxonomy":"minecraft_version","embeddable":true,"href":"https:\/\/vpesports.com\/minecraft\/wp-json\/wp\/v2\/minecraft_version?post=156540"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}