openhab / openhab-syno-spk

openHAB Synology SPK Install Package
Eclipse Public License 2.0
161 stars 42 forks source link

Wrong Timezone in DSM 6.0 #25

Closed gorzan14 closed 8 years ago

gorzan14 commented 8 years ago

Hi Christian, Timezone is wrong again. I suppose they changed the Strukturen of file /usr/share/zoneinfo/Timezone/tzlist. Could you send me this file beim DSM 5.2, so i could compare. I think we have to stick to the file synotztable.json. Nur the Strukture is different. Are you familiar with sed? I have an idea what to grep and to sed in this file to debug.

cniweb commented 8 years ago

Hi @gorzan14,

I think this is the problem: https://github.com/openhab/openhab-syno-spk/commit/7d14f4af29da997d5b4bb42798f9e51445ff1294 You a familiar?

Chris

gorzan14 commented 8 years ago

Hi Chris In DSM 6 the file tzname is not there. And as far I remember the DSM5 Version of tzlist has changed. In line 23 the city of timezone in my case „Amsterdam“ is saved to SYNO_TZ. In line 24 tzlist was searched for Amsterdam to get the correct java compatible timezone „Europe/Amsterdam“. But this info isn’t any more in tzlist. There ist just the word Amsterdam. Can you have a look to your DSM 5.. Is there the correct Timezone „Europe/Amsterdam“ in tzlist? If so. This is the problem. The full Timezone names are now in synotztable.json. But in an other Structure. Could send you the file. But I am not abel to change the sed command to copy the full timezonestring. Konrad

Am 02.06.2016 um 22:57 schrieb Christian Häussler notifications@github.com:

Hi @gorzan14 https://github.com/gorzan14,

I think this is the problem: 7d14f4a https://github.com/openhab/openhab-syno-spk/commit/7d14f4af29da997d5b4bb42798f9e51445ff1294 You a familiar?

Chris

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/openhab/openhab-syno-spk/issues/25#issuecomment-223420048, or mute the thread https://github.com/notifications/unsubscribe/AQH76Y5m3D8B3KcZBfAEHMT3_VU52TZrks5qH0O8gaJpZM4IqCuN.

gorzan14 commented 8 years ago

Hi Chris, If really the missing „Europe“ ist the problem we ca solve it for „all continents“ with this command line command: cat /usr/share/zoneinfo/Timezone/synotztable.json | jq -r '.Amsterdam.nameInTZDB‘

in the scrip line 24 it should look something like: SYNO_TZ='cat /usr/share/zoneinfo/Timezone/synotztable.json | jq -r ".${SYNO_TZ}.nameInTZDB“' But I need to see the old tzlist file.

I can’t find the start-stop-status.sh again. Can you tell me where I can find it to test? Konrad

Am 02.06.2016 um 22:57 schrieb Christian Häussler notifications@github.com:

Hi @gorzan14 https://github.com/gorzan14,

I think this is the problem: 7d14f4a https://github.com/openhab/openhab-syno-spk/commit/7d14f4af29da997d5b4bb42798f9e51445ff1294 You a familiar?

Chris

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/openhab/openhab-syno-spk/issues/25#issuecomment-223420048, or mute the thread https://github.com/notifications/unsubscribe/AQH76Y5m3D8B3KcZBfAEHMT3_VU52TZrks5qH0O8gaJpZM4IqCuN.

cniweb commented 8 years ago

Hi Konrad,

You can find the start-stop-status.sh script in /volume1/@appstore/OpenHAB on your DiskStation.

I think the timezone problem is depends on the DSM Version, or? In DSM 4/5 and DSM 6 is a different way to get the correct timezone.

Her is a post from @veance, I think this is the right way: https://community.openhab.org/t/synology-diskstation/1446/77?u=cniweb What do you mean?

Chris

gorzan14 commented 8 years ago

Yes definitly!

He takes the same string out of the same file as I discovered. See my post above. Take the line from his sctipt.

fix for DST time in DSM 5.2 thanks to MinimServer Syno package author
[ -e /usr/share/zoneinfo/Timezone/synotztable.json ] \
&& SYNO_TZ=jq ".${SYNO_TZ} | .nameInTZDB" /usr/share/zoneinfo/Timezone/synotztable.json | sed -e "s/\"//g"\
|| SYNO_TZ=grep "^${SYNO_TZ}" /usr/share/zoneinfo/Timezone/tzname | sed -e "s/^.*= //"

Seems it is tested with the start-stop script. I tested my command just partialy on command line.

Thanks and greets Konrad

cniweb commented 8 years ago

OK, but on DSM 4.x no synotztable.json File exist!

gorzan14 commented 8 years ago

Maybe. WE are Talking about the DSM 6.0 Branch of Syno-Spk! Don,t change it for version 5.2 or less the old Script worked Fine on 5.2.

Von meinem iPhone gesendet

Am 05.06.2016 um 21:13 schrieb Christian Häussler notifications@github.com:

OK, but on DSM 4.x no synotztable.json File exist!

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub, or mute the thread.

cniweb commented 8 years ago

Hi @gorzan14,

I draft a new release: https://github.com/openhab/openhab-syno-spk/releases/tag/1.8.3-DSM6 Try it, please!

Thanks, Chris

gorzan14 commented 8 years ago

Thank you!!! Install without Problems. Timezone now korrekt on DSM 6.0.

Von meinem iPhone gesendet

Am 06.06.2016 um 22:12 schrieb Christian Häussler notifications@github.com:

Hi @gorzan14,

I draft a new release: https://github.com/openhab/openhab-syno-spk/releases/tag/1.8.3-DSM6 Try it, please!

Thanks, Chris

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub, or mute the thread.

cniweb commented 8 years ago

Great, can I close this Issue?

gorzan14 commented 8 years ago

Yes!

Thanks!

Christian Häussler notifications@github.com hat am 8. Juni 2016 um 20:11 geschrieben:

Great, can I close this Issue?

—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub https://github.com/openhab/openhab-syno-spk/issues/25#issuecomment-224679213 , or mute the thread https://github.com/notifications/unsubscribe/AQH76RN6G0OUIr-tQiVpm6YXhPSF5B_lks5qJwW0gaJpZM4IqCuN .