Text Input Time Picker Returns Incorrect ms From Midnight

I try not to ask stupid questions and prefer to struggle until I figure it out myself. However, after many hours I am at a loss.

I'm running Node-Red version 3.0.2, Node.js version 16.20.1, Dashboard version 3.5.0 on Linux 5.10.103-v7+ arm LE. A recent upgrade changed the behavior of the Text Input node set to Time Picker mode.

According to the documentation, and how it use to work, the output payload is the number of ms since midnight. However, it is returning the number of ms since midnight offset by plus 8 hours. I have checked that the time/date on the hardware is indeed correct. I see that someone else on the forum created a topic stating that Dashboard 3.5 switched from local time to UTC (or vice-versa) but there were no responses. The delta between UTC and my local time (Pacific Daylight Savings) is 7 hours....not 8. This may be explained by the difference between UTC and Pacific Standard Time?

The simple flow below demonstrates the problem. The goal is to return the time in hh:mm format. The timeFix variable in the function node must be set to negative 8 hours (in ms) to return the correct time.

If the logic of my actual flow was simple I would make the offset change and move on. However, in my actual flow the text input node receives feedback from multiple sources and that is proving difficult to implement for all possible cases (sometimes the time is right, other times it is off by 8 hours).

Any insight would be most appreciated.

[
    {
        "id": "ce34a537ceac0b5e",
        "type": "function",
        "z": "bfc13c72.c79e1",
        "name": "Calc Time",
        "func": "// const fixTime = 0  // Return value is off by +8 hours\nconst fixTime = - 8 * 60 * 60 * 1000;  // Returns correct time\n\nconst mSec = msg.payload + fixTime;\nnode.warn(`mSec = ${mSec}`);\nmsg.payload = parseInt(mSec / 3.6e6).toString().padStart(2, '0') + ':' + parseInt((mSec % 3.6e6) / 6e4).toString().padStart(2, '0');\nreturn msg;",
        "outputs": 1,
        "noerr": 0,
        "initialize": "",
        "finalize": "",
        "libs": [],
        "x": 1200,
        "y": 1520,
        "wires": [
            [
                "b4c69a2b9229d1bc"
            ]
        ]
    },
    {
        "id": "b4c69a2b9229d1bc",
        "type": "debug",
        "z": "bfc13c72.c79e1",
        "name": "Debug Test Ctrl",
        "active": true,
        "tosidebar": true,
        "console": false,
        "tostatus": false,
        "complete": "payload",
        "targetType": "msg",
        "statusVal": "",
        "statusType": "auto",
        "x": 1380,
        "y": 1520,
        "wires": []
    },
    {
        "id": "c46224f62d551cb9",
        "type": "ui_text_input",
        "z": "bfc13c72.c79e1",
        "name": "Test Ctrl",
        "label": "Test Ctrl",
        "tooltip": "",
        "group": "36a6f291.d9686e",
        "order": 6,
        "width": "4",
        "height": "1",
        "passthru": false,
        "mode": "time",
        "delay": "0",
        "topic": "testTime",
        "sendOnBlur": false,
        "className": "",
        "topicType": "str",
        "x": 1040,
        "y": 1520,
        "wires": [
            [
                "ce34a537ceac0b5e"
            ]
        ]
    },
    {
        "id": "36a6f291.d9686e",
        "type": "ui_group",
        "name": "Other",
        "tab": "f5ab6e8f.f1246",
        "order": 3,
        "disp": true,
        "width": "8",
        "collapse": true
    },
    {
        "id": "f5ab6e8f.f1246",
        "type": "ui_tab",
        "name": "Test",
        "icon": "dashboard",
        "order": 7,
        "disabled": false,
        "hidden": false
    }
]

I shall only offer my thoughts.

I haven't looked at the code, but what sets off alarm bells for me is if you are using a node to get the time is that it will include the GMT offset.

Make sure you do not have the timezone set if you are using a time node.

Just a thought.

I'm 99.9% convinced it must be related to time zone. Prior to updates, it worked fine for many years so something changed. The text input node use to return local time. This node does not contain any time zone settings. And again, the offset between GMT and PDT is 7 hours not 8?

Please add a debug node showing what is coming out of the text input node. Then enter a time of 12:00 and tell us what it shows in the debug.

Input of 12:00 AM returns 28800000 ms which, when you do the math, equates to 08:00. 12:00 PM returns 72000000 ms or 20:00. If one subtracts 8 * 60 * 60 *1000 from ms 12:00 AM returns 0 ms or 00:00 (which would be the expected result).

If you run
date
in a command window what does it show?
Are you running node-red in Docker or similar?

Node-RED is running on a Raspberry Pi. Typing "Date" at the command prompt returns the proper date and time....currently "Thu 24 Aug 2023 10:09:58 AM PDT".

Please stop node red and start it again in a command window. If you installed using the recommended technique you can do that using
node-red-stop
node-red-start
or
node-red-reload
Then post the startup output here. Copy/paste please, not screenshot.

Starting as a systemd service.
24 Aug 10:16:42 - [info]
Welcome to Node-RED
===================
24 Aug 10:16:42 - [info] Node-RED version: v3.0.2
24 Aug 10:16:42 - [info] Node.js  version: v16.20.1
24 Aug 10:16:42 - [info] Linux 5.10.103-v7+ arm LE
24 Aug 10:16:43 - [info] Loading palette nodes
24 Aug 10:16:47 - [info] Dashboard version 3.5.0 started at /ui
24 Aug 10:16:47 - [info] Settings file  : /home/pi/.node-red/settings.js
24 Aug 10:16:47 - [info] Context store  : 'default' [module=localfilesystem]
24 Aug 10:16:47 - [info] Context store  : 'memoryOnly' [module=memory]
24 Aug 10:16:47 - [info] User directory : /home/pi/.node-red
24 Aug 10:16:47 - [warn] Projects disabled : editorTheme.projects.enabled=false
24 Aug 10:16:47 - [info] Flows file     : /home/pi/.node-red/flows.json
24 Aug 10:16:47 - [info] Server now running at http://127.0.0.1:1880/
24 Aug 10:16:47 - [info] Starting flows
24 Aug 10:16:48 - [info] Started flows
24 Aug 10:16:49 - [info] [udp in:UDP - Port 4002] udp multicast group 239.255.255.250
24 Aug 10:16:49 - [info] [udp in:UDP - Port 4002] udp listener at 0.0.0.0:4002
24 Aug 10:16:49 - [info] [udp out:Multicast to 4001] udp multicast ready: : -> 239.255.255.250:4001
24 Aug 10:16:49 - [info] [udp out:UDP - Port 4003] udp ready: 192.168.1.12:4003
24 Aug 10:16:49 - [info] [mqtt-broker:Main Pi] Connected to broker: mqtt://192.168.1.180:1883
Deprecation warning: value provided is not in a recognized RFC2822 or ISO format. moment construction falls back to js Date(), which is not reliable across all browsers and versions. Non RFC2822/ISO date formats are discouraged. Please refer to http://momentjs.com/guides/#/warnings/js-date/ for more info.
Arguments:
[0] _isAMomentObject: true, _isUTC: false, _useUTC: false, _l: undefined, _i: Thu Aug 24 09:12:11 PDT 2023, _f: undefined, _strict: undefined, _locale: [object Object]
Error
    at Function.createFromInputFallback (/home/pi/.node-red/node_modules/moment/moment.js:324:25)
    at configFromString (/home/pi/.node-red/node_modules/moment/moment.js:2550:19)
    at configFromInput (/home/pi/.node-red/node_modules/moment/moment.js:2993:13)
    at prepareConfig (/home/pi/.node-red/node_modules/moment/moment.js:2976:13)
    at createFromConfig (/home/pi/.node-red/node_modules/moment/moment.js:2943:44)
    at createLocalOrUTC (/home/pi/.node-red/node_modules/moment/moment.js:3037:16)
    at createLocal (/home/pi/.node-red/node_modules/moment/moment.js:3041:16)
    at hooks (/home/pi/.node-red/node_modules/moment/moment.js:16:29)
    at Function node:2b308a13bd0f9e60 [Process Motion]:72:14
    at Function node:2b308a13bd0f9e60 [Process Motion]:91:3
24 Aug 10:16:51 - [warn] [function:Pre-Processor] Mode 0 - Time = 06:00
24 Aug 10:16:58 - [warn] [function:Pre-Processor] Mode 0 - Time = 19:00

The Error is something I've been trying to track down for months. I do not believe it has anything to do with this issue as it use to work even with that error and is not related to the node in question in my flows.

The error is something wrong with the data you are passing to the moment module in your Process Motion function, but I expect you knew that.
At the moment I have no explanation for what you are seeing. It does not agree with what I see. I am in UTC+1 and if I put in 12:00 I get 11 hours of msec, which is at least understandable.

As a test could you rename your flows file (usually .node-red/flows.json) to something else. Probably best to make a backup of it first just in case. Then restart node-red, which should give you an empty flows file. Then import the test flow you posted, add the extra debug node and run it again. That will eliminate (or otherwise) the possibility that something else in your flows messing it up.

Renamed flow file, restarted, and copied test (see below). I then entered 12:00 AM into the text input node and as the log file shows (last two warn statements).....it is still offset by 28800000 ms (08:00).

Log File

Starting as a systemd service.
24 Aug 10:43:41 - [info]
Welcome to Node-RED
===================
24 Aug 10:43:41 - [info] Node-RED version: v3.0.2
24 Aug 10:43:41 - [info] Node.js  version: v16.20.1
24 Aug 10:43:41 - [info] Linux 5.10.103-v7+ arm LE
24 Aug 10:43:43 - [info] Loading palette nodes
24 Aug 10:43:46 - [info] Dashboard version 3.5.0 started at /ui
24 Aug 10:43:46 - [info] Settings file  : /home/pi/.node-red/settings.js
24 Aug 10:43:46 - [info] Context store  : 'default' [module=localfilesystem]
24 Aug 10:43:46 - [info] Context store  : 'memoryOnly' [module=memory]
24 Aug 10:43:46 - [info] User directory : /home/pi/.node-red
24 Aug 10:43:46 - [warn] Projects disabled : editorTheme.projects.enabled=false
24 Aug 10:43:46 - [info] Flows file     : /home/pi/.node-red/flows.json
24 Aug 10:43:46 - [info] Creating new flow file
24 Aug 10:43:46 - [info] Server now running at http://127.0.0.1:1880/
24 Aug 10:43:46 - [info] Starting flows
24 Aug 10:43:46 - [info] Started flows
24 Aug 10:45:20 - [info] Stopping modified nodes
24 Aug 10:45:20 - [info] Stopped modified nodes
24 Aug 10:45:21 - [info] Updated flows
24 Aug 10:45:21 - [info] Starting modified nodes
24 Aug 10:45:21 - [info] Started modified nodes
24 Aug 10:45:38 - [warn] [function:Calc Time] mSec = 28800000
24 Aug 10:45:38 - [warn] [function:Calc Time] 08:00

Test Flow

[
    {
        "id": "e6b3a06e7a0c0740",
        "type": "tab",
        "label": "Flow 1",
        "disabled": false,
        "info": "",
        "env": []
    },
    {
        "id": "ce34a537ceac0b5e",
        "type": "function",
        "z": "e6b3a06e7a0c0740",
        "name": "Calc Time",
        "func": "const fixTime = 0  // Return value is off by +8 hours\n// const fixTime = - 8 * 60 * 60 * 1000;  // Returns correct time\n\nconst mSec = msg.payload + fixTime;\nnode.warn(`mSec = ${mSec}`);\nmsg.payload = parseInt(mSec / 3.6e6).toString().padStart(2, '0') + ':' + parseInt((mSec % 3.6e6) / 6e4).toString().padStart(2, '0');\nnode.warn(msg.payload);\nreturn msg;",
        "outputs": 1,
        "noerr": 0,
        "initialize": "",
        "finalize": "",
        "libs": [],
        "x": 380,
        "y": 180,
        "wires": [
            [
                "b4c69a2b9229d1bc"
            ]
        ]
    },
    {
        "id": "b4c69a2b9229d1bc",
        "type": "debug",
        "z": "e6b3a06e7a0c0740",
        "name": "Debug Test Ctrl",
        "active": true,
        "tosidebar": true,
        "console": false,
        "tostatus": false,
        "complete": "payload",
        "targetType": "msg",
        "statusVal": "",
        "statusType": "auto",
        "x": 560,
        "y": 180,
        "wires": []
    },
    {
        "id": "c46224f62d551cb9",
        "type": "ui_text_input",
        "z": "e6b3a06e7a0c0740",
        "name": "Test Ctrl",
        "label": "Test Ctrl",
        "tooltip": "",
        "group": "47528d74.01eed4",
        "order": 6,
        "width": "6",
        "height": "1",
        "passthru": true,
        "mode": "time",
        "delay": "0",
        "topic": "testTime",
        "sendOnBlur": false,
        "className": "",
        "topicType": "str",
        "x": 220,
        "y": 180,
        "wires": [
            [
                "ce34a537ceac0b5e"
            ]
        ]
    },
    {
        "id": "47528d74.01eed4",
        "type": "ui_group",
        "name": "Sprinklers",
        "tab": "27110031.1be8e",
        "order": 5,
        "disp": true,
        "width": "8",
        "collapse": true
    },
    {
        "id": "27110031.1be8e",
        "type": "ui_tab",
        "name": "Main-2",
        "icon": "dashboard",
        "order": 2,
        "disabled": false,
        "hidden": false
    }
]

I can't import your flows at the moment, but it doesn't look as if you have added a debug node connected directly to the text input node.

Edit OK, I see you have modified your function node so that the node-warn does show the raw output from the text in node.

What does this flow show?

[{"id":"e10bd8c577618dfe","type":"debug","z":"e6b3a06e7a0c0740","name":"debug 101","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","statusVal":"","statusType":"auto","x":630,"y":580,"wires":[]},{"id":"852c78cd3af31ebe","type":"inject","z":"e6b3a06e7a0c0740","name":"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"","payloadType":"date","x":240,"y":600,"wires":[["cd4961a1067e2e7e"]]},{"id":"cd4961a1067e2e7e","type":"exec","z":"e6b3a06e7a0c0740","command":"/bin/date","addpay":"","append":"","useSpawn":"false","timer":"","winHide":false,"oldrc":false,"name":"","x":440,"y":600,"wires":[["e10bd8c577618dfe"],[],[]]}]

Also, what browser are you using, and what time zone is the browser machine set to?

Can you try a different browser?

There is no need to inject into a Text Input node, if that is what you mean?

Well, I copied/pasted his "example" with a button function and debug and ran as is.
I got NaN for the output.

Oh... Stupid me.

SORRY!

I'll delete the post.
I didn't go to the GUI part. I injected from the edit screen.

I had a meeting to attend and just got back. Your test flow produces the correct PDT time

Thu 24 Aug 2023 02:16:31 PM PDT

I am running Chrome. I tried MS Edge and get the same 8 hour offset. I searched for "time zone" and "time" in the browser's settings but could not find anything related to time zone.

Question: why does the text input node (set to time mode) even care what the system time is as that is the input? It just needs to return the number of ms between the entered time and 12:00 am (i.e., there is not dependency on system time). I suspect the answer is it shares code with week or date time modes which may depend on the system time.

I did some more digging b/c I don't want to be that guy (not willing to put forth the effort). I am JS rookie but after a few hours I found the important bit of code on the Dashboard Github and copied that into a function node then added numerous node.warn() statements for debug purposes. If I send the function a time formatted as "hh:mm" the code reports the CORRECT ms since midnight. However, I noticed the epoch time is shifted by 8 hours (might be OK). If I format the input as a full blown date/time string: a) I don't understand how it would ever report the correct ms since midnight without subtraction of another date value as demonstrated in my function node at the bottom b) if I correct for that (high probability this is attributable to programmer error as I'm just a hobbyist who hacks his way through things) the resulting ms are off by 7 hrs (EDIT This is true if the input is 2 AM but not midnight as shown in logs below). Although I have no idea what I am doing, I think the answer to my problem is wrapped up in the results somehow. I just need an expert to interpret.

Code extracted from Github with node.warn statements added to a function node for testing purposes:

// ==========CODE SNIPPET FROM DASHBOARD GITHUB=========
// ===(Added node.warn statements for debug purposes)===

var dtmval = new Date(msg.value);
node.warn(`dtmval init = ${dtmval}`)
// initial check for millisecond timestamp
if (isNaN(msg.value)) {
    // first check for a time string like "22:30"
    var check = msg.value.match(/^(\d\d):(\d\d)/);
    if (check == null) {
        // then check for an input date (string)
        node.warn('check = null')
        var millis = Date.parse(msg.value);
        if (isNaN(millis)) {
            node.warn(`Date.parse() failed. Revert to current time. millis = ${millis}`);
            millis = Date.now();     // unknown format, default to now
            node.warn(`millis now = ${millis}`)
        }
        dtmval = new Date(millis);
    }
    else {
        dtmval = new Date("1970-01-01 " + check[1] + ":" + check[2] + ":00Z");
        node.warn(`hh:mm format. check1 = ${check[1]} check2 = ${check[2]}`);
    }
}
dtmval.setMilliseconds(0);
dtmval.setSeconds(0);
msg.value = dtmval;
node.warn(`dtmval final = ${dtmval} or ${Date.parse(dtmval)} ms or ${Date.parse(dtmval)/3.6E6} hrs`);
// me.item.value = msg.value; (NOT REQUIRED FOR THIS TEST)


// ==========END CODE FROM DASHBOARD GITHUB==========

// If dtmval was calculated via hh:mm the return value (ms) is correct
// However, epoch time is offset by negative 8 hours? Example: 
// (00:00 -> Wed Dec 31 1969 16:00:00 GMT-0800 (Pacific Standard Time))

// If dtmval was calculated via a full date-time string using Date.parse(),
// the return value is shifted by 8 hours. Also, I believe you have to subtract 
// the return value from the calculated midnight for the specific date. For example:

const midNight = new Date(dtmval);
node.warn(`midNight 1 = ${midNight} This is off by -8 hours`);
midNight.setHours(0,0,0,0)
node.warn(`midNight 2 = ${midNight}`);
node.warn(`midNight 3 = ${Date.parse(midNight)}`);
const milliSinceMidNight = Date.parse(dtmval) - Date.parse(midNight);
msg.myResult = milliSinceMidNight

// The above does not work because midNight1 is off by -8 hours. 
// midNight2 is correct but when you Date.parse the value to
// calculate midNight3, it is off by 8 hours again. Net result,
// the calculated ms are off by 7 hours? 

return msg;

A simple test flow that injects a time in either hh:mm (which works) or full blown date format (which fails)

[
    {
        "id": "1997248c341a1d2d",
        "type": "inject",
        "z": "bfc13c72.c79e1",
        "name": "Inject Time hh:mm",
        "props": [
            {
                "p": "value",
                "v": "00:00",
                "vt": "str"
            }
        ],
        "repeat": "",
        "crontab": "",
        "once": false,
        "onceDelay": 0.1,
        "topic": "",
        "x": 130,
        "y": 2720,
        "wires": [
            [
                "4014986fbd9b66ed"
            ]
        ]
    },
    {
        "id": "4014986fbd9b66ed",
        "type": "function",
        "z": "bfc13c72.c79e1",
        "name": "function 3",
        "func": "// ==========CODE SNIPPET FROM DASHBOARD GITHUB=========\n// ===(Added node.warn statements for debug purposes)===\n\nvar dtmval = new Date(msg.value);\nnode.warn(`dtmval init = ${dtmval}`)\n// initial check for millisecond timestamp\nif (isNaN(msg.value)) {\n    // first check for a time string like \"22:30\"\n    var check = msg.value.match(/^(\\d\\d):(\\d\\d)/);\n    if (check == null) {\n        // then check for an input date (string)\n        node.warn('check = null')\n        var millis = Date.parse(msg.value);\n        if (isNaN(millis)) {\n            node.warn(`Date.parse() failed. Revert to current time. millis = ${millis}`);\n            millis = Date.now();     // unknown format, default to now\n            node.warn(`millis now = ${millis}`)\n        }\n        dtmval = new Date(millis);\n    }\n    else {\n        dtmval = new Date(\"1970-01-01 \" + check[1] + \":\" + check[2] + \":00Z\");\n        node.warn(`hh:mm format. check1 = ${check[1]} check2 = ${check[2]}`);\n    }\n}\ndtmval.setMilliseconds(0);\ndtmval.setSeconds(0);\nmsg.value = dtmval;\nnode.warn(`dtmval final = ${dtmval} or ${Date.parse(dtmval)} ms or ${Date.parse(dtmval)/3.6E6} hrs`);\n// me.item.value = msg.value; (NOT REQUIRED FOR THIS TEST)\n\n\n// ==========END CODE FROM DASHBOARD GITHUB==========\n\n// If dtmval was calculated via hh:mm the return value (ms) is correct\n// However, epoch time is offset by negative 8 hours? Example: \n// (00:00 -> Wed Dec 31 1969 16:00:00 GMT-0800 (Pacific Standard Time))\n\n// If dtmval was calculated via a full date-time string using Date.parse(),\n// the return value is shifted by 8 hours. Also, I believe you have to subtract \n// the return value from the calculated midnight for the specific date. For example:\n\nconst midNight = new Date(dtmval);\nnode.warn(`midNight 1 = ${midNight} This is off by -8 hours`);\nmidNight.setHours(0,0,0,0)\nnode.warn(`midNight 2 = ${midNight}`);\nnode.warn(`midNight 3 = ${Date.parse(midNight)}`);\nconst milliSinceMidNight = Date.parse(dtmval) - Date.parse(midNight);\nmsg.myResult = milliSinceMidNight\n\n// The above does not work because midNight1 is off by -8 hours. \n// midNight2 is correct but when you Date.parse the value to\n// calculate midNight3, it is off by 8 hours again. Net result,\n// the calculated ms are off by 7 hours? \n\nreturn msg;",
        "outputs": 1,
        "noerr": 0,
        "initialize": "",
        "finalize": "",
        "libs": [],
        "x": 380,
        "y": 2720,
        "wires": [
            [
                "a0921217c73fdad8"
            ]
        ]
    },
    {
        "id": "a0921217c73fdad8",
        "type": "debug",
        "z": "bfc13c72.c79e1",
        "name": "debug 102",
        "active": true,
        "tosidebar": true,
        "console": false,
        "tostatus": false,
        "complete": "true",
        "targetType": "full",
        "statusVal": "",
        "statusType": "auto",
        "x": 610,
        "y": 2720,
        "wires": []
    },
    {
        "id": "d31df523059c2c4e",
        "type": "inject",
        "z": "bfc13c72.c79e1",
        "name": "Inject Time yyyy-mm-ddThh:mm:00.000Z",
        "props": [
            {
                "p": "value",
                "v": "2023-08-24T00:00:00.000Z",
                "vt": "str"
            }
        ],
        "repeat": "",
        "crontab": "",
        "once": false,
        "onceDelay": 0.1,
        "topic": "",
        "x": 200,
        "y": 2780,
        "wires": [
            [
                "4014986fbd9b66ed"
            ]
        ]
    }
]

This is the log output for:

hh:mm inject set to 00:00

24 Aug 20:48:45 - [warn] [function:function 3] dtmval init = Invalid Date
24 Aug 20:48:45 - [warn] [function:function 3] hh:mm format. check1 = 00 check2 = 00
24 Aug 20:48:45 - [warn] [function:function 3] dtmval final = Wed Dec 31 1969 16:00:00 GMT-0800 (Pacific Standard Time) or 0 ms or 0 hrs
24 Aug 20:48:45 - [warn] [function:function 3] midNight 1 = Wed Dec 31 1969 16:00:00 GMT-0800 (Pacific Standard Time) This is off by -8 hours
24 Aug 20:48:45 - [warn] [function:function 3] midNight 2 = Wed Dec 31 1969 00:00:00 GMT-0800 (Pacific Standard Time)
24 Aug 20:48:45 - [warn] [function:function 3] midNight 3 = -57600000

full blown time/date spec = 2023-08-24T00:00:00.000Z

24 Aug 20:51:56 - [warn] [function:function 3] dtmval init = Wed Aug 23 2023 17:00:00 GMT-0700 (Pacific Daylight Time)
24 Aug 20:51:56 - [warn] [function:function 3] check = null
24 Aug 20:51:56 - [warn] [function:function 3] dtmval final = Wed Aug 23 2023 17:00:00 GMT-0700 (Pacific Daylight Time) or 1692835200000 ms or 470232 hrs
24 Aug 20:51:56 - [warn] [function:function 3] midNight 1 = Wed Aug 23 2023 17:00:00 GMT-0700 (Pacific Daylight Time) This is off by -8 hours
24 Aug 20:51:56 - [warn] [function:function 3] midNight 2 = Wed Aug 23 2023 00:00:00 GMT-0700 (Pacific Daylight Time)
24 Aug 20:51:56 - [warn] [function:function 3] midNight 3 = 1692774000000