File tree Expand file tree Collapse file tree 5 files changed +13
-10
lines changed
resources/assets/opencomputers/loot/openos/lib/core
scala/li/cil/oc/server/machine Expand file tree Collapse file tree 5 files changed +13
-10
lines changed Original file line number Diff line number Diff line change @@ -5,7 +5,7 @@ forge.version=14.23.5.2860
5
5
6
6
mod.name =OpenComputers
7
7
mod.group =li.cil.oc
8
- mod.version =1.8.8 -snapshot
8
+ mod.version =1.8.9 -snapshot
9
9
10
10
ae2.version =rv6-stable-7
11
11
buildcraft.version =7.99.24.8
Original file line number Diff line number Diff line change 1
1
## Fixes/improvements
2
2
3
+ * [ #3621 ] Fix ` os.time() ` being off by one hour
3
4
* [ #3682 ] Add error handling to the ` flash ` OpenOS program
4
5
* [ #3764 ] Fix left and right names being swapped in the Rack GUI
5
6
* [ #3779 ] Fix ` os.sleep(0) ` causing ` too long without yielding ` (Ocawesome101)
Original file line number Diff line number Diff line change 1
1
-- called from /init.lua
2
2
local raw_loadfile = ...
3
3
4
- _G ._OSVERSION = " OpenOS 1.8.8 "
4
+ _G ._OSVERSION = " OpenOS 1.8.9 "
5
5
6
6
-- luacheck: globals component computer unicode _OSVERSION
7
7
local component = component
Original file line number Diff line number Diff line change @@ -67,10 +67,11 @@ class OSAPI(owner: NativeLuaArchitecture) extends NativeLuaAPI(owner) {
67
67
if (lua.isNoneOrNil(1 )) {
68
68
// Game time is in ticks, so that each day has 24000 ticks, meaning
69
69
// one hour is game time divided by one thousand. Also, Minecraft
70
- // starts days at 6 o'clock, versus the 1 o'clock of timestamps so we
71
- // add those five hours. Thus:
72
- // timestamp = (time + 5000) * 60[kh] * 60[km] / 1000[s]
73
- lua.pushNumber(((machine.worldTime + 5000 ) * 60 * 60 ) / 1000.0 )
70
+ // starts days at 6 o'clock; os.time() reflects UTC while os.date()
71
+ // reflects the local time zone, but Minecraft has no concept of
72
+ // time zones, so this detail can be ignored. Thus:
73
+ // timestamp = (time + 6000) * 60[kh] * 60[km] / 1000[s]
74
+ lua.pushNumber(((machine.worldTime + 6000 ) * 60 * 60 ) / 1000.0 )
74
75
}
75
76
else {
76
77
def getField (key : String , d : Int ) = {
Original file line number Diff line number Diff line change @@ -51,10 +51,11 @@ class OSAPI(owner: LuaJLuaArchitecture) extends LuaJAPI(owner) {
51
51
if (args.isnoneornil(1 )) {
52
52
// Game time is in ticks, so that each day has 24000 ticks, meaning
53
53
// one hour is game time divided by one thousand. Also, Minecraft
54
- // starts days at 6 o'clock, versus the 1 o'clock of timestamps so we
55
- // add those five hours. Thus:
56
- // timestamp = (time + 5000) * 60[kh] * 60[km] / 1000[s]
57
- LuaValue .valueOf((machine.worldTime + 5000 ) * 60 * 60 / 1000 )
54
+ // starts days at 6 o'clock; os.time() reflects UTC while os.date()
55
+ // reflects the local time zone, but Minecraft has no concept of
56
+ // time zones, so this detail can be ignored. Thus:
57
+ // timestamp = (time + 6000) * 60[kh] * 60[km] / 1000[s]
58
+ LuaValue .valueOf((machine.worldTime + 6000 ) * 60 * 60 / 1000 )
58
59
}
59
60
else {
60
61
val table = args.checktable(1 )
You can’t perform that action at this time.
0 commit comments