Mine was a variable "UID" in /data/config/SystemCfg.CFG
I'm guessing you have a different model of Zosi camera to me, as mine doesn't have that file, and doesn't even have a
/data directory...
The camera I've been messing around with is a Zosi ZG2615. I also have a couple of Zosi ZG2612.
I did it at the router level. The downfall is that NTP doesn't work, because I haven't found the specific server it is using (nor can I find a way to define it, its not listening to DHCP Option 42).
I know you managed to get it to use a different NTP server via DHCP, but just for reference (or for others who come across this thread) on my camera the
/config/ntp_param.config file indicates it is using
1.cn.pool.ntp.org for NTP.
Time zone can be set in /data/config/SystemCfg.CFG (19 is GMT-4 according to /etc/TZ, 18 was GMT-3:30 so perhaps there is a pattern) but it does not seem to respect it in the timestamp, or the date command
Edit 2: How to timezone:
1) Get your /etc/TZ from a linux device, I got mine from OpenWRT, and it was EST5EDT,M3.2.0,M11.1.0 (Note: it does not understand named TZ (eg America/New_York) nor does it properly respect GMT-4)
2) create a file called /overlay/etc/timezone and save your timezone to it, on a single line.
3) Run mkdir -p /overlay/etc/init.d
4) Run cp /etc/init.d/S60ansjeripc /overlay/etc/init.d/S60ansjeripc
5) Edit /overlay/etc/init.d/S60ansjeripc and add the following on a new line after "start)"
export TZ=$(cat /etc/timezone)
cp /etc/timezone /overlay/etc/TZ
6) Run sync
7) Reboot camera
Unfortunately, this won't work for my cameras, as there is no
/data directory (and therefore no
/data/config/SystemCfg.CFG file), no
/overlay directory and no
/etc/init.d/S60ansjeripc file.
What I have managed to work out so far is the following:
- I can write files into /etc/init.d and these persist across reboots
- I created a file /etc/init.d/S99timezone which successfully overwrites /etc/TZ and successfully sets the timezone (confirmed by writing it back to a log file using cat). However something later in the startup process appears to overwrite /etc/TZ back to GMT-8
- I edited the file /app/start.sh and added some lines at the end which successfully overwrites /etc/TZ and successfully sets the timezone (again confirmed by writing it back to a log file using cat). However something still later in the startup process appears to overwrite /etc/TZ back to GMT-8
So I think the next steps for me are to somehow try and work out
what is overwriting the timezone and when, although I'm not sure at this stage how I'm going to do that...
I'm thinking I may be able to still use a script in
/etc/init.d or still use the end of
/app/start.sh but insert a wait timer.
I may also play around with
/etc/inittab and see if I can get it to overwrite
/etc/TZ at an appropriate time...