Install Asset
Install via Godot
To maintain one source of truth, Godot Asset Library is just a mirror of the old asset library so you can download directly on Godot via the integrated asset library browser
![LocalTime hero image](https://img.godotassetlibrary.com/Z9mUYk0Q-0wegMMM_5tWBmtZWZhWQrJQMAvzRhNmCxc/rs:fit:1920:1080:0/g:no/aHR0cHM6Ly9yYXcuZ2l0aHVidXNlcmNvbnRlbnQuY29tL25la29mbGVldC9sb2NhbC10aW1lL21haW4vaWNvbi5wbmc.webp)
Quick Information
![LocalTime icon image](https://img.godotassetlibrary.com/DVs9GU-ULbN70iGl_NDMSCgmWMFwx3h1GrFfMT5hn9o/rs:fit:50:50:0/g:no/aHR0cHM6Ly9yYXcuZ2l0aHVidXNlcmNvbnRlbnQuY29tL25la29mbGVldC9sb2NhbC10aW1lL21haW4vaWNvbi5wbmc.webp)
A class for local time.Not compatible with DST.How to use# Create objectvar t = LocalTime.now()# Setter / Gettert.day = 15print(t.month)# Add timet.add_days(100)t.hour += 48# Formatprint(t.format("{lweekday}, {month}/{day}/{year}"))
LocalTime for Godot Engine 4
A class for local time.
Not compatible with DST.
How to install
(1) Download ZIP file
[ Code ](green button) > Download ZIP
(If you want all files, please use git clone)
(2) Copy file
Copy from (unzipped file)/addons/local_time/local_time.gd
to (your project)/(anywhere)/
How to use
# Create object
var t = LocalTime.now()
# Setter / Getter
t.day = 15
print(t.month)
# Add time
t.add_days(100)
t.hour += 48
# Format
print(t.format("{lweekday}, {month}/{day}/{year}"))
See also class documents.
Script tab > Search Help > LocalTime
Versions
- 1.0.0: First version.
A class for local time.
Not compatible with DST.
How to use
# Create object
var t = LocalTime.now()
# Setter / Getter
t.day = 15
print(t.month)
# Add time
t.add_days(100)
t.hour += 48
# Format
print(t.format("{lweekday}, {month}/{day}/{year}"))
Reviews
Quick Information
![LocalTime icon image](https://img.godotassetlibrary.com/DVs9GU-ULbN70iGl_NDMSCgmWMFwx3h1GrFfMT5hn9o/rs:fit:50:50:0/g:no/aHR0cHM6Ly9yYXcuZ2l0aHVidXNlcmNvbnRlbnQuY29tL25la29mbGVldC9sb2NhbC10aW1lL21haW4vaWNvbi5wbmc.webp)
A class for local time.Not compatible with DST.How to use# Create objectvar t = LocalTime.now()# Setter / Gettert.day = 15print(t.month)# Add timet.add_days(100)t.hour += 48# Formatprint(t.format("{lweekday}, {month}/{day}/{year}"))