sudo -i

add-apt-repository ppa:linuxuprising/java

apt-get update

apt-get install oracle-java10-installer


proxy 이슈가 있다면 setproxy를 써서 설치한다.



Posted by '김용환'
,


python pytz에 좀 버그가 있다. 



근데, 어디서 많이 본 정상혁 아저씨가 보인다

https://github.com/stub42/pytz/blob/master/tz/asia#L1928

(참고 썸머 타임 글 관련 기고 https://d2.naver.com/helloworld/645609)



>>> import pytz

>>> from datetime import datetime

>>> fmt = '%Y-%m-%d %H:%M:%S %Z%z'

>>> seoul = pytz.timezone('Asia/Seoul')

>>> seoul

<DstTzInfo 'Asia/Seoul' LMT+8:28:00 STD>

>>> seoul_dt = seoul.localize(datetime(2018, 6, 19, 17, 53))

>>> seoul_dt.strftime(fmt)

'2018-06-19 17:53:00 KST+0900'


관련해서 내용을 올렸다.


https://github.com/stub42/pytz/issues/15


Hi!

I found a time zone issue which changed Pyongyang(North Korea) time zoned recently.
According to 'https://en.wikipedia.org/wiki/Time_in_North_Korea', I found 'On 29 April 2018, North Korean leader Kim Jong-un announced his country would be returning to UTC+9 to realign its clocks with South Korea. '. It based on the Guadian Newspaper('https://www.theguardian.com/world/2018/may/05/time-for-change-north-korea-moves-clocks-forward-to-match-south')

Below code is not match the Wiki.

import pytz
import datetime

def main():
	
	seoul = pytz.timezone('Asia/Seoul')
	print(seoul.localize(datetime.datetime.now()))
	
	pyongyang = pytz.timezone('Asia/Pyongyang')
	print(pyongyang.localize(datetime.datetime.now()))
	
if __name__ == '__main__':
	main()

The result is below.

2018-06-19 18:23:36.818206+09:00
2018-06-19 18:23:36.818469+08:30

Second result should be equal to '2018-06-19 18:23:36.818469+09:00'

Could you change code and and document(https://github.com/stub42/pytz/blob/master/tz/asia#L1997)?

And When I test the previous example, I found another interesting sample code.

>>> import pytz

>>> from datetime import datetime

>>> fmt = '%Y-%m-%d %H:%M:%S %Z%z'

>>> seoul = pytz.timezone('Asia/Seoul')

>>> seoul

<DstTzInfo 'Asia/Seoul' KST+8:30:00 STD>
>>> pyongyang = pytz.timezone('Asia/Pyongyang')
>>> pyounyang

<DstTzInfo 'Asia/Pyongyang' KST+8:30:00 STD>

Finally, I found another interesting document. You described world timezone. Previsous menthioned, I think it should be changed.

https://github.com/stub42/pytz/blob/master/tz/asia#L47
https://github.com/stub42/pytz/blob/master/tz/asia#L50
-> I think it should be removed at '8:30 KST KDT Korea when at +0830', maintained at ''9:00 KST KDT Korea when at +09'.

Thanks in advance.






Posted by '김용환'
,


자바 코드에서 lombok을 사용해서 gradle이 컴파일된다고 해서 intellij에서 자동 빌드가 되지 않는다.


intellij에서 lombok 플러그인을 설치하고 설정을 진행해야 한다.



* 설치

Preferences -> Plugin -> Browse Repositories 에서 Lombok 플러그인을 찾아 설치한다.



* 설정

Preferences -> Build, Execution, Deployment -> Compiler -> Annotation Processors 에서 

Enable annotation processing을 선택해 활성화시킨다.

Posted by '김용환'
,


docker 컨테이너 로그를 계속 보고 싶다면(tail -f효과)를 다음 url을 확인할 수 있다.


https://docs.docker.com/engine/reference/commandline/container_logs/#related-commands


docker logs --tail 커맨드를 사용한다.




docker logs -f --tail  --it $container-ps-id


docker logs --follow --tail  --it $container-ps-id

Posted by '김용환'
,