Not a bug

ubooquity time 1 hour behinde

Emmanuel 6 years ago updated by Tom 5 years ago 15
I am using ubooquity on a Synology NAS. I see that the time in the log files is 1 hour behind the NAS system time. Do more users have this issue? 
Under review
I have not seen this issue myself but I don't own a NAS.
Any additional info/ideas are welcome as for know I don't see where the problem could come from.
Problem spontaneously disappeared. Strange.
I'm glad it did as I had no idea of the cause. :)
I am using Ubooquity on a QNAP NAS since 2 days. I see in my log files, that the server ist 2 hours behind the NAS system time. Is it a problem for the operation of the server?
No it should not. (excluding cases I may have overlooked)
Thank you. It seems that Ubooquity uses Greenich Mean Time.
Well, it should not (there is no timezone management at all in Ubooquity, all is done by the Java Virtual Machine running it).
But unless this oddity it has other unexpected side effects, the problem is not really worth investigating (I have never been able to reproduce it on my side).
I decided I wanted to test it sooner than later :). The -Duser.timezone parameter worked for me (on my QNAP).

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).
The list of supported timezones depends of the version of the JVM you use, but this list should give you a close enough idea of what's available.

If the city you specify uses DST (I've heard NYC does ;)), Java will automatically change time twice a year.
Hi, Sparkss,
because I am
not enough familiar with server management, it would be great
if you could post your modified .sh file and how to use QJDK8.
Here is my UbooQuity.sh. I updated 3 lines, one for using the QJDK8 (make sure the QJDK8 package is installed and active already) and the other two were for the timezone. The original lines are still there, with a # in front of them to comment them out, with my updated line right below. Hope that helps!

** 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.

QPKG_ROOT=`/sbin/getcfg $QPKG_NAME Install_Path -f ${CONF}`

QPKG_ROOT1=`/sbin/getcfg $QPKG_NAME1 Install_Path -f ${CONF}`

export JAVA=$JAVA_HOME/bin/java
export PKILL=$QPKG_ROOT/pkill

case "$1" in
ENABLED=$(/sbin/getcfg $QPKG_NAME Enable -u -d FALSE -f $CONF)
if [ "$ENABLED" != "TRUE" ]; then
echo "$QPKG_NAME is disabled."
exit 1

#$JAVA -jar Ubooquity.jar -webadmin -headless &
$JAVA -Duser.timezone=America/New_York -jar Ubooquity.jar -webadmin -headless &



#$PKILL -f "$JAVA -jar Ubooquity.jar -webadmin -headless"
$PKILL -f "$JAVA -Duser.timezone=America/New_York -jar Ubooquity.jar -webadmin -headless"


$0 stop
$0 start

echo "Usage: $0 {start|stop|restart}"
exit 1

exit 0
THANK YOU! it works!
Incidentally, it also works with QJDK7. First I have only deactivated the QJDK7 and actived the QJDK8. But after a restart of Ubooquity Server I got errors in the log file. After that I tried the changed UbooQuity.sh file with QJDK7 and int works fine. After that I changed back to QJDK8 and made a Restart of my QNAP NAS. Now it works fine with QJDK8.
The topic of DST I solved in this way:
$JAVA -Duser.timezone=Etc/GMT-2 -jar Ubooquity.jar -webadmin -headless &
When we change to normal time, I change the entry manually to "Etc/GMT-1".
Thank you very much!

NP, glad I could help, and TY for sharing the extra information on how to handle DST!

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 :)