Translated timestamp.php to timestamp.lua.
This commit is contained in:
parent
1713577e62
commit
1d7173dbcc
2 changed files with 20 additions and 1 deletions
19
timestamp/timestamp.lua
Normal file
19
timestamp/timestamp.lua
Normal file
|
|
@ -0,0 +1,19 @@
|
|||
---
|
||||
permalink: /cgi/timestamp/index.lua
|
||||
---
|
||||
|
||||
-- Set the timezone (not directly supported in Lua)
|
||||
-- You'll need to handle timezone conversion manually if needed
|
||||
|
||||
-- Get current time
|
||||
local timestamp = os.date("%Y.%m.%d-%H:%M:%S")
|
||||
|
||||
-- Get current time in milliseconds
|
||||
local milliseconds = os.time() * 1000
|
||||
|
||||
-- Output the HTTP header
|
||||
io.write("Content-Type: text/plain; charset=utf-8\r\n\r\n")
|
||||
|
||||
-- Output result
|
||||
io.write(timestamp .. '.' .. milliseconds)
|
||||
|
||||
|
|
@ -1,5 +1,5 @@
|
|||
---
|
||||
permalink: /cgi/timestamp/
|
||||
permalink: /cgi/timestamp/obsolete.php
|
||||
---
|
||||
|
||||
<?php
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue