You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@karaf.apache.org by sion-zenit <si...@yandex.ru> on 2017/03/02 09:45:02 UTC
Re: shell:date wrong time
Hi! In karaf client I execute command shell:date and it return a time
different for an hour.
Client output
karaf@trun()> version
4.0.5
karaf@trun()> shell:date
Tue Feb 28 12:44:08 MSK 2017
System output
$ date
Втр Фев 28 11:44:38 MSK 2017
OS Linux MYSRV 2.6.32-573.22.1.el6.x86_64
How solve this problem?
--
View this message in context: http://karaf.922171.n3.nabble.com/shell-date-wrong-time-tp4049693p4049710.html
Sent from the Karaf - User mailing list archive at Nabble.com.
Re: shell:date wrong time
Posted by Guillaume Nodet <gn...@apache.org>.
The problem is that we use
new Date()
which does not support time zone well. Instead, we should use
new GregorianCalendar()
or
java.time.LocalDateTime.now()
That's for the timezone.
For the language, I guess it comes from the formatter used, we don't use
the locale afaik:
https://github.com/apache/felix/blob/trunk/gogo/jline/src/main/java/org/apache/felix/gogo/jline/Posix.java#L264
2017-03-02 14:48 GMT+01:00 Jean-Baptiste Onofré <jb...@nanthrax.net>:
> By the way, it works fine on my box.
>
> Gonna investigate.
>
> Regards
> JB
>
>
> On 03/02/2017 02:40 PM, sion-zenit wrote:
>
>> Guillaume Nodet-2, thanks for the answer.
>> https://issues.apache.org/jira/browse/KARAF-5005
>>
>>
>>
>> --
>> View this message in context: http://karaf.922171.n3.nabble.
>> com/shell-date-wrong-time-tp4049693p4049714.html
>> Sent from the Karaf - User mailing list archive at Nabble.com.
>>
>>
> --
> Jean-Baptiste Onofré
> jbonofre@apache.org
> http://blog.nanthrax.net
> Talend - http://www.talend.com
>
--
------------------------
Guillaume Nodet
Re: shell:date wrong time
Posted by Jean-Baptiste Onofré <jb...@nanthrax.net>.
By the way, it works fine on my box.
Gonna investigate.
Regards
JB
On 03/02/2017 02:40 PM, sion-zenit wrote:
> Guillaume Nodet-2, thanks for the answer.
> https://issues.apache.org/jira/browse/KARAF-5005
>
>
>
> --
> View this message in context: http://karaf.922171.n3.nabble.com/shell-date-wrong-time-tp4049693p4049714.html
> Sent from the Karaf - User mailing list archive at Nabble.com.
>
--
Jean-Baptiste Onofr
jbonofre@apache.org
http://blog.nanthrax.net
Talend - http://www.talend.com
Re: shell:date wrong time
Posted by sion-zenit <si...@yandex.ru>.
Guillaume Nodet-2, thanks for the answer.
https://issues.apache.org/jira/browse/KARAF-5005
--
View this message in context: http://karaf.922171.n3.nabble.com/shell-date-wrong-time-tp4049693p4049714.html
Sent from the Karaf - User mailing list archive at Nabble.com.
Re: shell:date wrong time
Posted by Guillaume Nodet <gn...@apache.org>.
Could you raise a JIRA issue for that please ?
2017-03-02 10:45 GMT+01:00 sion-zenit <si...@yandex.ru>:
> Hi! In karaf client I execute command shell:date and it return a time
> different for an hour.
>
> Client output
> karaf@trun()> version
> 4.0.5
> karaf@trun()> shell:date
> Tue Feb 28 12:44:08 MSK 2017
>
> System output
> $ date
> Втр Фев 28 11:44:38 MSK 2017
> OS Linux MYSRV 2.6.32-573.22.1.el6.x86_64
> How solve this problem?
>
>
>
> --
> View this message in context: http://karaf.922171.n3.nabble.
> com/shell-date-wrong-time-tp4049693p4049710.html
> Sent from the Karaf - User mailing list archive at Nabble.com.
>
--
------------------------
Guillaume Nodet
Re: shell:date wrong time
Posted by Jean-Baptiste Onofré <jb...@nanthrax.net>.
Thanks for the update.
We gonna take a look and keep you posted via the Jira.
Regards
JB
On 03/03/2017 10:31 AM, sion-zenit wrote:
> Same problem
> client output
> karaf@root()> version
> 4.1.0
> karaf@root()> shell:date
> Mar Fri 3 13:28:50 2017
>
> OS output
> $ date
> Fri Mar 3 12:28:59 MSK 2017
>
>
>
> --
> View this message in context: http://karaf.922171.n3.nabble.com/shell-date-wrong-time-tp4049693p4049727.html
> Sent from the Karaf - User mailing list archive at Nabble.com.
>
--
Jean-Baptiste Onofr
jbonofre@apache.org
http://blog.nanthrax.net
Talend - http://www.talend.com
Re: shell:date wrong time
Posted by sion-zenit <si...@yandex.ru>.
Same problem
client output
karaf@root()> version
4.1.0
karaf@root()> shell:date
Mar Fri 3 13:28:50 2017
OS output
$ date
Fri Mar 3 12:28:59 MSK 2017
--
View this message in context: http://karaf.922171.n3.nabble.com/shell-date-wrong-time-tp4049693p4049727.html
Sent from the Karaf - User mailing list archive at Nabble.com.
Re: shell:date wrong time
Posted by Guillaume Nodet <gn...@apache.org>.
Could you run the same with Karaf 4.1.0 please ?
2017-03-02 10:45 GMT+01:00 sion-zenit <si...@yandex.ru>:
> Hi! In karaf client I execute command shell:date and it return a time
> different for an hour.
>
> Client output
> karaf@trun()> version
> 4.0.5
> karaf@trun()> shell:date
> Tue Feb 28 12:44:08 MSK 2017
>
> System output
> $ date
> Втр Фев 28 11:44:38 MSK 2017
> OS Linux MYSRV 2.6.32-573.22.1.el6.x86_64
> How solve this problem?
>
>
>
> --
> View this message in context: http://karaf.922171.n3.nabble.
> com/shell-date-wrong-time-tp4049693p4049710.html
> Sent from the Karaf - User mailing list archive at Nabble.com.
>
--
------------------------
Guillaume Nodet