Created
May 29, 2013 22:17
-
-
Save ichramm/5674287 to your computer and use it in GitHub Desktop.
Lua function that returns the current time in UTC.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--[[! | |
-- @return The current time in UTC | |
--]] | |
function gmtime() | |
return os.time(os.date("!*t")); | |
end |
is there any way to get time from redis server (version <= 3.2) with lua script ?
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
This is wrong.
Epoch time is the same for every timezone.
But this calculates shifted epoch time.
Correct usages are:
This response was written just because this gist appears by "lua date gmt" search query ;)