luci-base: rename getLocaltime to getUnixtime
authorPaul Donald <[email protected]>
Fri, 17 Oct 2025 11:44:16 +0000 (13:44 +0200)
committerPaul Donald <[email protected]>
Fri, 17 Oct 2025 11:44:25 +0000 (13:44 +0200)
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 <[email protected]>
modules/luci-base/root/usr/share/rpcd/ucode/luci

index 458c6573c2845fb3ad6b754adc50a89f31149452..056db549c47a856f7dd170d098f7ce273130e653 100644 (file)
@@ -94,8 +94,9 @@ const methods = {
                }
        },
 
-       getLocaltime: {
+       getUnixtime: {
                call: function(request) {
+                       // time() ; Returns the current UNIX epoch.
                        return { result: time() };
                }
        },