Skip to content

utils.time.fromTimestamp

utils.time.fromTimestamp(timestamp)
This function set a timestamp.

Arguments

Argument Data Type Optional Default Value Explanation
timestamp int No - Sets the time

Dependency

local utils = M("utils")

Example

local w, d, h, m, s = utils.time.fromTimestamp((60*60)*24)

print("weeks: " .. w, "days: " .. d, "hours: " .. h, "minutes: " .. m, "seconds: " .. s) -- Returns weeks: 0 days: 1 hours: 0 minutes: 0 seconds: 0

Improve this documentation