diff --git a/VERSION b/VERSION index 7d879fbd2..493053fa1 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -15.4.7-rc6 \ No newline at end of file +15.4.7-rc7 \ No newline at end of file diff --git a/lib/os/lua/info.ex b/lib/os/lua/info.ex index 3e0838b9d..efdfec5f4 100644 --- a/lib/os/lua/info.ex +++ b/lib/os/lua/info.ex @@ -84,7 +84,7 @@ defmodule FarmbotOS.Lua.Info do def utc(["hour"], lua), do: {[utc_p().hour], lua} def utc(["minute"], lua), do: {[utc_p().minute], lua} def utc(["second"], lua), do: {[utc_p().second], lua} - def utc(_, lua), do: {[DateTime.to_string(utc_p())], lua} + def utc(_, lua), do: {[DateTime.to_iso8601(utc_p())], lua} def local_time(["year"], lua), do: {[local_time_p().year], lua} def local_time(["month"], lua), do: {[local_time_p().month], lua} @@ -92,7 +92,7 @@ defmodule FarmbotOS.Lua.Info do def local_time(["hour"], lua), do: {[local_time_p().hour], lua} def local_time(["minute"], lua), do: {[local_time_p().minute], lua} def local_time(["second"], lua), do: {[local_time_p().second], lua} - def local_time(_, lua), do: {[DateTime.to_string(local_time_p())], lua} + def local_time(_, lua), do: {[DateTime.to_iso8601(local_time_p())], lua} defp utc_p() do DateTime.utc_now() diff --git a/test/os/lua/ext/info_test.exs b/test/os/lua/ext/info_test.exs index b09e4b62b..3bbee765e 100644 --- a/test/os/lua/ext/info_test.exs +++ b/test/os/lua/ext/info_test.exs @@ -127,7 +127,7 @@ defmodule FarmbotOS.Lua.InfoTest do test "utc()" do utc = DateTime.utc_now() - now = String.slice(DateTime.to_string(utc), 0..15) + now = String.slice(DateTime.to_iso8601(utc), 0..15) lua_code = "return utc()" {:ok, [actual]} = lua(lua_code, lua_code) assert String.starts_with?(actual, now) @@ -171,7 +171,7 @@ defmodule FarmbotOS.Lua.InfoTest do test "local_time()" do tz = "America/Chicago" local = Timex.Timezone.convert(DateTime.utc_now(), tz) - now = String.slice(DateTime.to_string(local), 0..15) + now = String.slice(DateTime.to_iso8601(local), 0..15) lua_code = "return local_time()" {:ok, [actual]} = lua(lua_code, lua_code) assert String.starts_with?(actual, now)