16.04 - How to update daylight timezone for an app in ubuntu machine - Ask Ubuntu


turkey decided permanently stay in same time.

dst ended on thursday, 8 september 2016, 00:00:00. clocks not changed.

turkey between +2 , +3 utc, stay in +3. see here.

there discussion on stackoverflow have application in spring boot in ubuntu machine. how take date:

cmntwrapper.setcreatedatstring(cmnt.getcreatedat(). now(zoneid.of(constants.turkey_zone)). format(datetimeformatter.ofpattern(constants.date_time_format))); 

this shows time 13.50, 14.50, because in +3.

what can do?

i dont want use utc +3 because may next year, "lets again use +2-+3 switching daylight saving concept". can't risk it.

i can't change code in future weeks. stay permanent after few weeks.

what suggest permanent?

the iana suggests this:

java -jar tzupdater.jar options 

but doesnot work:

root@vegan:/home/vegan/downloads/tzdb# java -jar tzdata-latest.tar.gz error: invalid or corrupt jarfile tzdata-latest.tar.gz 

that jva

root@vegan:/usr/bin# whereis java java: /usr/bin/java /usr/share/java /usr/share/man/man1/java.1.gz 

when try in directory

root@vegan:/usr/bin# java -jar tzupdater.jar -u -l http://www.iana.org/time-zones/repository/tzdata-latest.tar.gz 

i got error version , can't install tz:

vegan@vegan:~$ sudo apt-get update  [sudo] password vegan:   hit:1 http://tr.archive.ubuntu.com/ubuntu xenial inrelease  hit:2 http://tr.archive.ubuntu.com/ubuntu xenial-updates inrelease           hit:3 http://tr.archive.ubuntu.com/ubuntu xenial-backports inrelease   hit:4 http://security.ubuntu.com/ubuntu xenial-security inrelease      hit:5 http://ppa.launchpad.net/apandada1/brightness-controller/ubuntu xenial inrelease ign:6 http://ppa.launchpad.net/midori/ppa/ubuntu xenial inrelease               ign:7 http://dl.google.com/linux/chrome/deb stable inrelease                 hit:8 http://ppa.launchpad.net/notepadqq-team/notepadqq/ubuntu xenial inrelease hit:9 http://repo.yandex.ru/yandex-browser/deb beta inrelease                   hit:10 http://dl.google.com/linux/chrome/deb stable release                   hit:11 http://ppa.launchpad.net/webupd8team/java/ubuntu xenial inrelease  ign:12 http://ppa.launchpad.net/midori/ppa/ubuntu xenial release hit:13 https://deb.opera.com/opera-stable stable inrelease ign:14 http://ppa.launchpad.net/midori/ppa/ubuntu xenial/main amd64 packages hit:16 https://apt.dockerproject.org/repo ubuntu-xenial inrelease ign:17 http://ppa.launchpad.net/midori/ppa/ubuntu xenial/main i386 packages ign:18 http://ppa.launchpad.net/midori/ppa/ubuntu xenial/main packages ign:19 http://ppa.launchpad.net/midori/ppa/ubuntu xenial/main translation-en_us ign:20 http://ppa.launchpad.net/midori/ppa/ubuntu xenial/main translation-en hit:21 https://deb.nodesource.com/node_5.x xenial inrelease ign:22 http://ppa.launchpad.net/midori/ppa/ubuntu xenial/main amd64 dep-11 metadata ign:23 http://ppa.launchpad.net/midori/ppa/ubuntu xenial/main dep-11 64x64 icons ign:14 http://ppa.launchpad.net/midori/ppa/ubuntu xenial/main amd64 packages ign:17 http://ppa.launchpad.net/midori/ppa/ubuntu xenial/main i386 packages ign:18 http://ppa.launchpad.net/midori/ppa/ubuntu xenial/main packages ign:19 http://ppa.launchpad.net/midori/ppa/ubuntu xenial/main translation-en_us ign:20 http://ppa.launchpad.net/midori/ppa/ubuntu xenial/main translation-en ign:22 http://ppa.launchpad.net/midori/ppa/ubuntu xenial/main amd64 dep-11 metadata ign:23 http://ppa.launchpad.net/midori/ppa/ubuntu xenial/main dep-11 64x64 icons ign:14 http://ppa.launchpad.net/midori/ppa/ubuntu xenial/main amd64 packages ign:17 http://ppa.launchpad.net/midori/ppa/ubuntu xenial/main i386 packages ign:18 http://ppa.launchpad.net/midori/ppa/ubuntu xenial/main packages ign:19 http://ppa.launchpad.net/midori/ppa/ubuntu xenial/main translation-en_us ign:20 http://ppa.launchpad.net/midori/ppa/ubuntu xenial/main translation-en ign:22 http://ppa.launchpad.net/midori/ppa/ubuntu xenial/main amd64 dep-11 metadata ign:23 http://ppa.launchpad.net/midori/ppa/ubuntu xenial/main dep-11 64x64 icons ign:14 http://ppa.launchpad.net/midori/ppa/ubuntu xenial/main amd64 packages ign:17 http://ppa.launchpad.net/midori/ppa/ubuntu xenial/main i386 packages ign:18 http://ppa.launchpad.net/midori/ppa/ubuntu xenial/main packages ign:19 http://ppa.launchpad.net/midori/ppa/ubuntu xenial/main translation-en_us ign:20 http://ppa.launchpad.net/midori/ppa/ubuntu xenial/main translation-en ign:22 http://ppa.launchpad.net/midori/ppa/ubuntu xenial/main amd64 dep-11 metadata ign:23 http://ppa.launchpad.net/midori/ppa/ubuntu xenial/main dep-11 64x64 icons ign:14 http://ppa.launchpad.net/midori/ppa/ubuntu xenial/main amd64 packages ign:17 http://ppa.launchpad.net/midori/ppa/ubuntu xenial/main i386 packages ign:18 http://ppa.launchpad.net/midori/ppa/ubuntu xenial/main packages ign:19 http://ppa.launchpad.net/midori/ppa/ubuntu xenial/main translation-en_us ign:20 http://ppa.launchpad.net/midori/ppa/ubuntu xenial/main translation-en ign:22 http://ppa.launchpad.net/midori/ppa/ubuntu xenial/main amd64 dep-11 metadata ign:23 http://ppa.launchpad.net/midori/ppa/ubuntu xenial/main dep-11 64x64 icons err:14 http://ppa.launchpad.net/midori/ppa/ubuntu xenial/main amd64 packages   404  not found ign:17 http://ppa.launchpad.net/midori/ppa/ubuntu xenial/main i386 packages ign:18 http://ppa.launchpad.net/midori/ppa/ubuntu xenial/main packages ign:19 http://ppa.launchpad.net/midori/ppa/ubuntu xenial/main translation-en_us ign:20 http://ppa.launchpad.net/midori/ppa/ubuntu xenial/main translation-en ign:22 http://ppa.launchpad.net/midori/ppa/ubuntu xenial/main amd64 dep-11 metadata ign:23 http://ppa.launchpad.net/midori/ppa/ubuntu xenial/main dep-11 64x64 icons reading package lists... done w: target packages (main/binary-amd64/packages) configured multiple times in /etc/apt/sources.list.d/yandex-browser-beta.list:3 , /etc/apt/sources.list.d/yandex-browser.list:1 w: target packages (main/binary-all/packages) configured multiple times in /etc/apt/sources.list.d/yandex-browser-beta.list:3 , /etc/apt/sources.list.d/yandex-browser.list:1 w: target translations (main/i18n/translation-en_us) configured multiple times in /etc/apt/sources.list.d/yandex-browser-beta.list:3 , /etc/apt/sources.list.d/yandex-browser.list:1 w: target translations (main/i18n/translation-en) configured multiple times in /etc/apt/sources.list.d/yandex-browser-beta.list:3 , /etc/apt/sources.list.d/yandex-browser.list:1 w: target dep-11 (main/dep11/components-amd64.yml) configured multiple times in /etc/apt/sources.list.d/yandex-browser-beta.list:3 , /etc/apt/sources.list.d/yandex-browser.list:1 w: target dep-11-icons (main/dep11/icons-64x64.tar) configured multiple times in /etc/apt/sources.list.d/yandex-browser-beta.list:3 , /etc/apt/sources.list.d/yandex-browser.list:1 w: repository 'http://ppa.launchpad.net/midori/ppa/ubuntu xenial release' not have release file. n: data such repository can't authenticated , therefore potentially dangerous use. n: see apt-secure(8) manpage repository creation , user configuration details. e: failed fetch http://ppa.launchpad.net/midori/ppa/ubuntu/dists/xenial/main/binary-amd64/packages 404  not found e: index files failed download. have been ignored, or old ones used instead. w: target packages (main/binary-amd64/packages) configured multiple times in /etc/apt/sources.list.d/yandex-browser-beta.list:3 , /etc/apt/sources.list.d/yandex-browser.list:1 w: target packages (main/binary-all/packages) configured multiple times in /etc/apt/sources.list.d/yandex-browser-beta.list:3 , /etc/apt/sources.list.d/yandex-browser.list:1 w: target translations (main/i18n/translation-en_us) configured multiple times in /etc/apt/sources.list.d/yandex-browser-beta.list:3 , /etc/apt/sources.list.d/yandex-browser.list:1 w: target translations (main/i18n/translation-en) configured multiple times in /etc/apt/sources.list.d/yandex-browser-beta.list:3 , /etc/apt/sources.list.d/yandex-browser.list:1 w: target dep-11 (main/dep11/components-amd64.yml) configured multiple times in /etc/apt/sources.list.d/yandex-browser-beta.list:3 , /etc/apt/sources.list.d/yandex-browser.list:1 w: target dep-11-icons (main/dep11/icons-64x64.tar) configured multiple times in /etc/apt/sources.list.d/yandex-browser-beta.list:3 , /etc/apt/sources.list.d/yandex-browser.list:1   vegan@vegan:~$ sudo apt-get upgrade tzdata tzdata-java  reading package lists... done building dependency tree         reading state information... done e: unable locate package tzdata-java 

also for

vegan@vegan:~$ sudo apt-get install tzdata-java reading package lists... done building dependency tree        reading state information... done e: unable locate package tzdata-java 

and how can make java? because test linux machine, see please

puapp@pu-app-01:~$ java -jar tzupdater.jar -u -l https://www.iana.org/time-zones/repository/releases/tzdata2015g.tar.gz program 'java' can found in following packages:  * default-jre  * gcj-4.8-jre-headless  * openjdk-7-jre-headless  * gcj-4.6-jre-headless  * openjdk-6-jre-headless try: sudo apt-get install <selected package>                        

so jre not installed application now. so, can now? if install jre, changes? when run date, shows correct time in console. generated app docker.

puapp@pu-app-01:~$ java version program 'java' can found in following packages:  * default-jre  * gcj-4.8-jre-headless  * openjdk-7-jre-headless  * gcj-4.6-jre-headless  * openjdk-6-jre-headless try: sudo apt-get install <selected package>   puapp@pu-app-01:~$ whereis java java: /usr/share/java 

but in local have java.

vegan@vegan:~$ java -version java version "1.8.0_111" java(tm) se runtime environment (build 1.8.0_111-b14) java hotspot(tm) 64-bit server vm (build 25.111-b14, mixed mode) 

but local not important. linux server immportant.

and our main machine, there java

produp@produp-app-01:~$ java -version java version "1.8.0_91" java(tm) se runtime environment (build 1.8.0_91-b14) java hotspot(tm) 64-bit server vm (build 25.91-b14, mixed mode) produp@produp-app-01:~$  

now time 00.44. when run

vegan@vegan:/usr/bin/tzdb$ date cum kas  4 00:44:47 +03 2016 

it returns correct time, in app time still 1 hour later. don't know if hour correct. if console shows true hour, can tzdata app?

hh.... political decisions timezones , dst included in updates of tzdata , tzdata-java packages... simple update of packages need provide "current" political timezone...

here change log tzdata , see new upstream release, dst changes turkey (lp: #1621373) added @ 2016-10-21.

sudo apt-get update sudo apt-get upgrade tzdata 

edited...

but!!! appears there no longer tzdata-java - have , follow links in answers @ what happened tzdata-java in xenial 16.04? possible workarounds via ppa.


Comments

Popular posts from this blog

download - Firefox cannot save files (most of the time), how to solve? - Super User

windows - "-2146893807 NTE_NOT_FOUND" when repair certificate store - Super User