[READ-ONLY] Mirror of https://github.com/thoda-dev/DualUniverse. DualUniverse scripts
0

Configure Feed

Select the types of activity you want to include in your feed.

Update TimeScript.lua

authored by

Thomas and committed by
GitHub
(Sep 30, 2020, 10:40 AM +0200) 0663f5b1 5a73ca92

+17
+17
TimeScript/TimeScript.lua
··· 1 + [[-- 2 + Jericho's time script -- https://github.com/Jericho1060 3 + Display IRL time in game 4 + https://github.com/Jericho1060/DualUniverse/tree/master/TimeScript 5 + ]]-- 6 + 1 7 summer_time = true --export 2 8 3 9 function getTimeTable(time) ··· 11 17 local timeTable = getTimeTable(time) 12 18 return string.format("%02d:%02d:%02d",timeTable[1],timeTable[2],timeTable[3]) 13 19 end 20 + 21 + 22 + --[[ 23 + USAGE 24 + Copy the full script in Library > Start 25 + 26 + local timeTable = getTimeTable(system.getTime()) -- return a table with 3 values : {hour, minutes, seconds} 27 + local timeString = getTimeString(system.getTime()) -- return a formated string : "HH:mm:ss" 28 + 29 + you can add a timer every seconds to display the time 30 + ]]--