-
Notifications
You must be signed in to change notification settings - Fork 135
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
confusing behavior when UI and server interpret time zone name differently #167
Comments
I created a new log file where: launched moonfire-nvr visited UI, select "main", just heading appeared, no entries. select "sub", entries + heading appeared. Deselected both. shutdown moonfire-nvr. here is the log:
|
Sorry, I'm just noticing this issue now. Are you still having this problem? The What does |
I had to ad a "c" to the end of the URL, so this URL works:
I launched moonfire and then entered the URL above and received:
|
(Oh, yes, I made a typo in the UUID.) That response looks correct. Probably a Javascript-side problem then. Hmm, if you open up your browser's developer console and have the network tab open when you load the page, what URLs does it request? There should be one like this with a |
Did as requested. I had not been running moonfire while this issue lingered, and I started and stopped moonfire to perform the tests you suggested today, 9/24. Hence, there will not be a lot of backlog. What this problem is looking to be is a difference of time zones, i.e. UTC vs. local time (PDT). See that the most recent file has a UTC timestamp, whereas I am accessing it at 9:00 a.m. PDT Again, I am running moonfire on a VM on Xen and see the failure of accessing hwclock from within a guest VM. This suggests to me that there is a mismatch between UTC and local time somewhere. Maybe there should be a clock on the UI indicating the time that the server thinks it is? Or maybe have the default start time be the time the page is instantiated and/or refreshed (but this might interfere with caching values a user may want instead?)? |
Hmm. The server is supposed to tell the browser what time zone to use for display. Looking more closely, its API response in your opening comment says
Yeah, I could probably put this in the top bar somewhere. I've struggled with Javascript time libraries but probably can also put in a warning if the time zone can't be found.
My goal is to use the server-side time zone regardless of the browser. Sometimes I do look at a NVR in another time zone and I find this way less confusing; then the UI matches the timestamp the cameras embed in the video stream, the time zone I'd use when communicating with anyone actually near the house, etc. |
Seeing nothing set for TZ, I set it with:
and then started moonfire-nvr and this time the time settings were my local time: I believe that the reason the files were not showing up at the start of this issue is because I had files dated in the next day as of UTC whereas my date, PDT, was not the same, so nothing was showing. The work-around is to export one's TZ into the environment before running moonfire-nvr. Thank you! |
My server-side time zone detection works like this:
|
I"m running a moonfire-nvr on a VM referencing a camera that is about 3' of network cable away and goes through a Power Over Ethernet ("PoE") and a Switch, I'm testing packet loss. I have two feeds, a "main" and a "sub". When I try to view a listing of the "main", nothing appears. When I try to view a listing of the "sub", entries duly appear.
To Reproduce
Log into ares:8080, click the main view, no entries appear. Click the sub view, then another heading appears with entries for the sub.
Expected behavior
I should see entries for the "main" video
Screenshots
Server (please complete the following information):
If building from git:
git describe --dirty
+moonfire-nvr --version
ares /usr/local/src/moonfire-nvr.git # svn status
? trunk/server/target
? trunk/ui/build
? trunk/ui/node_modules
ares /usr/local/src/moonfire-nvr.git # svn info
Path: .
Working Copy Root Path: /usr/local/src/moonfire-nvr.git
URL: https://github.com/scottlamb/moonfire-nvr.git
Relative URL: ^/
Repository Root: https://github.com/scottlamb/moonfire-nvr.git
Repository UUID: 69f685ad-12d6-831e-7d07-ce57b7db7bff
Revision: 1244
Node Kind: directory
Schedule: normal
Last Changed Author: john.poole
Last Changed Rev: 1244
Last Changed Date: 2021-09-13 17:00:43 -0700 (Mon, 13 Sep 2021)
ares /usr/local/src/moonfire-nvr.git #
Attach a log file. Run with the
RUST_BACKTRACE=1
environment variable set if possible.Not sure where the port 8080 server's log file is. I'm saving a copy of the moonfire-nvr STDERR file and provide entries around 8:30 p.m. 9/19/21 PDT when I attempted to list entries for "main"
Camera (please complete the following information):
Device Name: ReolinkNetworkTest1
Model: RLC-420-5MP
Build No. build 19013001
Hw No. IPC=51516M5M
Cfg version: v2.0.0.0
Fw Version: V2.0.0.354-19013001
Details: IPC_51516M5M110000000100000
IP 192.168.1.56
Desktop (please complete the following information):
OS:
taurus /usr/local/src # uname -a
Linux taurus 5.10.27-gentoo Rust #6 SMP Mon May 10 20:44:46 PDT 2021 x86_64 Intel(R) Core(TM) i7-8550U CPU @ 1.80GHz GenuineIntel GNU/Linux
taurus /usr/local/src #
Browser Firefox
Version 92.0 (64-bit)
Smartphone (please complete the following information):
NA
Additional context
Running moonfire-nvr on Gentoo VM "ares". I noticed the following when trying to use hwclock:
Also, files are being written to the directory, videos/main, specified for "main". Here is a listing:
A listing of the directory .../videos/sub duly shows lots of files.
The api call:
displays:
The text was updated successfully, but these errors were encountered: