From 54432996bb44fb97aa74cdacb9c9e623a679e56f Mon Sep 17 00:00:00 2001 From: Paul Donald Date: Fri, 17 Oct 2025 13:44:16 +0200 Subject: [PATCH] luci-base: rename getLocaltime to getUnixtime There appear to be no consumers of getLocaltime. One instance of a callGetLocaltime uses the system info call whose localtime property uses tm->tm_gmtoff which is "Seconds East of UTC" i.e. a unixtime value with the timezone baked in to the value. Sometimes we actually want Unixtime. So rename to clarify what this function actually returns. Signed-off-by: Paul Donald --- modules/luci-base/root/usr/share/rpcd/ucode/luci | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/modules/luci-base/root/usr/share/rpcd/ucode/luci b/modules/luci-base/root/usr/share/rpcd/ucode/luci index 458c6573c2..056db549c4 100644 --- a/modules/luci-base/root/usr/share/rpcd/ucode/luci +++ b/modules/luci-base/root/usr/share/rpcd/ucode/luci @@ -94,8 +94,9 @@ const methods = { } }, - getLocaltime: { + getUnixtime: { call: function(request) { + // time() ; Returns the current UNIX epoch. return { result: time() }; } }, -- 2.30.2