Your comments
** For QNAP systems only, and make sure to have the correct QJDK package installed **
EDIT: All formatting/tabs were lost. Sorry for the bad formatting :(. Not sure if I can attach the .sh file directly here or not.
[code]
#!/bin/sh
24691 admin 101480 S /share/HDA_DATA/.qpkg/QJDK8/bin/java -Duser.timezone=America/New_York -jar Ubooquity.jar -webadmin -headless
The time in the logs is now matched with system time. I do not know how it will handle DST, I will research that when the time comes up (pun intended). I am still looking for a list of TZs that JAVA will accept to see if there are any DSTs in there. The tzmappings file referrenced in the article does not exist on my system. There is a tzdb.dat, but it is not a flat file, so nothing that I can pull from it. For now I am good though.
For the other QNAP user, let me know if you want me to post my updated UbooQuity.sh file (updated for timezone, EST, and to use QJDK8).
https://docs.oracle.com/javase/8/docs/technotes/guides/troubleshoot/time-zone002.html
It is a pain when trying to troubleshoot and correlate a log entry with an event, or other system logs, so it is useful to have it set (for me). According to the article we need to use the -Duser.timezone. I will test it and report back.
8.2.5 Check -Duser.timezone System Property
You can explicitly set a default time zone on the command line by using the Java system property called user.timezone
. This bypasses the settings in the Windows operating system and can be a workaround in some cases. For instance, this setting is useful if you want DST (daylight saving time) only for a single Java program running on the system.
The following example examines the system property -Duser.timezone by running a Java program called DefaultTimeTestZone from the Windows Command Prompt window.
c:\tztest> java -Duser.timezone=America/New_York DefaultTimeZone
America/New_York
If setting a default time zone explicitly by specifying -Duser.timezone
works for the DefaultTimeTestZone
program, but does not work for your program, you should check whether your code overwrites the default Java time zone during runtime, with a method call such as this:
TimeZone.setDefault(TimeZone zone
Customer support service by UserEcho
Good to know that the timezone parameter works on both JDK packages for our QNAP's. As a side note, I didn't change to QJDK8 because of the timezone issue, I did it because I was having some issues with Ubooquity crashing (not a lot in the logs, it would just stop responding and eventually restart itself). I am hoping that JDK8 will be more stable. I also started running out of memory and swapping, I have a new memory stick sitting here to upgrade my NAS. Hopefully the combination of those two "upgrades" will be the solution :)