Turkey decided to permanently stay in same time.
DST ended on Thursday, 8 September 2016, 00:00:00. Clocks were not changed.
Turkey is between +2 and +3 UTC, so now it will stay in +3. See here.
There is a discussion on StackOverflow but I have an application in Spring Boot in an Ubuntu machine. This is how I take my date:
cmntWrapper.setCreatedAtString(cmnt.getCreatedAt().
now(ZoneId.of(Constants.TURKEY_ZONE)).
format(DateTimeFormatter.ofPattern(Constants.DATE_TIME_FORMAT)));
This shows the time as 13.50, but it is actually 14.50, because we are in +3.
What can I do?
I dont want to use UTC +3 because they may say next year, "lets again use to +2-+3 switching to daylight saving concept". So I can't risk it.
I can't change the code in future weeks. It will stay permanent after a few weeks.
What do you suggest for permanent?
java -jar tzupdater.jar options
But it doesnot work:
root@vegan:/home/vegan/Downloads/tzdb# java -jar tzdata-latest.tar.gz Error: Invalid or corrupt jarfile tzdata-latest.tar.gz
That is my jva
root@vegan:/usr/bin# whereis java
java: /usr/bin/java /usr/share/java /usr/share/man/man1/java.1.gz
When I try to do in that 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 for version and I can't install tz
:
vegan@vegan:~$ sudo apt-get update
[sudo] password for 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 all 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 all 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 all
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 all
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 all
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 all
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) is configured multiple times in
/etc/apt/sources.list.d/yandex-browser-beta.list:3 and
/etc/apt/sources.list.d/yandex-browser.list:1 W: Target Packages
(main/binary-all/Packages) is configured multiple times in
/etc/apt/sources.list.d/yandex-browser-beta.list:3 and
/etc/apt/sources.list.d/yandex-browser.list:1 W: Target Translations
(main/i18n/Translation-en_US) is configured multiple times in
/etc/apt/sources.list.d/yandex-browser-beta.list:3 and
/etc/apt/sources.list.d/yandex-browser.list:1 W: Target Translations
(main/i18n/Translation-en) is configured multiple times in
/etc/apt/sources.list.d/yandex-browser-beta.list:3 and
/etc/apt/sources.list.d/yandex-browser.list:1 W: Target DEP-11
(main/dep11/Components-amd64.yml) is configured multiple times in
/etc/apt/sources.list.d/yandex-browser-beta.list:3 and
/etc/apt/sources.list.d/yandex-browser.list:1 W: Target DEP-11-icons
(main/dep11/icons-64x64.tar) is configured multiple times in
/etc/apt/sources.list.d/yandex-browser-beta.list:3 and
/etc/apt/sources.list.d/yandex-browser.list:1 W: The repository
'http://ppa.launchpad.net/midori/ppa/ubuntu xenial Release' does not
have a Release file. N: Data from such a repository can't be
authenticated and is therefore potentially dangerous to use. N: See
apt-secure(8) manpage for repository creation and user configuration
details. E: Failed to fetch
http://ppa.launchpad.net/midori/ppa/ubuntu/dists/xenial/main/binary-amd64/Packages
404 Not Found E: Some index files failed to download. They have been
ignored, or old ones used instead. W: Target Packages
(main/binary-amd64/Packages) is configured multiple times in
/etc/apt/sources.list.d/yandex-browser-beta.list:3 and
/etc/apt/sources.list.d/yandex-browser.list:1 W: Target Packages
(main/binary-all/Packages) is configured multiple times in
/etc/apt/sources.list.d/yandex-browser-beta.list:3 and
/etc/apt/sources.list.d/yandex-browser.list:1 W: Target Translations
(main/i18n/Translation-en_US) is configured multiple times in
/etc/apt/sources.list.d/yandex-browser-beta.list:3 and
/etc/apt/sources.list.d/yandex-browser.list:1 W: Target Translations
(main/i18n/Translation-en) is configured multiple times in
/etc/apt/sources.list.d/yandex-browser-beta.list:3 and
/etc/apt/sources.list.d/yandex-browser.list:1 W: Target DEP-11
(main/dep11/Components-amd64.yml) is configured multiple times in
/etc/apt/sources.list.d/yandex-browser-beta.list:3 and
/etc/apt/sources.list.d/yandex-browser.list:1 W: Target DEP-11-icons
(main/dep11/icons-64x64.tar) is configured multiple times in
/etc/apt/sources.list.d/yandex-browser-beta.list:3 and
/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 to 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 to locate package tzdata-java
and also how can I make java? because for my test linux machine, see this please
puapp@PU-APP-01:~$ java -jar tzupdater.jar -u -l https://www.iana.org/time-zones/repository/releases/tzdata2015g.tar.gz
The program 'java' can be found in the 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 is not installed but the application is up now. So, what can I do now? If I install JRE, what changes? When I run date
, it shows the correct time already in console. I generated this app with Docker.
puapp@PU-APP-01:~$ java version
The program 'java' can be found in the 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 I 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 is not important. that linux server is immportant.
and for our main machine, there is 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 the time is 00.44. When I run
vegan@vegan:/usr/bin/tzdb$ date
Cum Kas 4 00:44:47 +03 2016
It returns the correct time, but in app the time is still 1 hour later. I don't know if always the hour was correct. If console shows true hour, what can tzdata
do to app?
Hh.... Usually all political decisions about timezones and DST are included in updates of the tzdata and tzdata-java packages... So simple update of those packages need to provide the "current" political timezone...
Here is the change log for the tzdata and I see New upstream release, with DST changes for Turkey (LP: #1621373) added at 2016-10-21.
EDITED...
BUT!!! It appears that there is no longer tzdata-java - have a look and follow the links in the answers at What happened to tzdata-java in Xenial 16.04? for possible workarounds via PPA.