Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <script src="https://github.com/fengari-lua/fengari-web/releases/download/v0.1.0/fengari-web.js"></script>
- <Center><div>The local time in Ixnay is <span id="IxTime"></span></div></Center>
- <script type="application/lua">
- local epoch = os.time{year=2014,day=1,month=1}
- -- equation: x + y = 2016*365+182; x + z = 2024*365; z = y * 4
- -- this assumes 4x rate past normal time
- -- attempts to use 3x rate could not provide accurate results following timestamps
- function conv(t)
- local time = os.time(t)
- local seconds_since_epoch = time - epoch
- return seconds_since_epoch * 4 + epoch
- end
- js.global.document:querySelector("#IxTime").innerHTML = os.date(" %Y-%m-%d %H:%M:%S", conv(os.date('*t', os.time())))
- </script>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement