Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ethereum 컴포넌트 : timestamp <-> date format #20

Open
seungwongo opened this issue Jan 14, 2019 · 1 comment
Open

Ethereum 컴포넌트 : timestamp <-> date format #20

seungwongo opened this issue Jan 14, 2019 · 1 comment

Comments

@seungwongo
Copy link
Contributor

seungwongo commented Jan 14, 2019

이더리움의 스마트컨트랙트에 datetime을 저장할때, uint 타입으로 저장하게 됨.
datetime 값을 uint로 변환하는 컴포턴트와
역으로 uint를 datetime으로 변환하는 컴포넌트 필요

var date = new Date(timestamp * 1000);

lbj90 added a commit that referenced this issue Jan 18, 2019
@lbj90
Copy link
Contributor

lbj90 commented Jan 18, 2019

@seungwongo
데이터를 다루는 부분이라 필터로 만들었습니다.
필터들은 스크립트에서 바로 쓸수도 있습니다.

this.RdDate(1546268400,'x','X') // timestamp -> ms
this.RdDate(1546268400000,'X','x') // ms -> timestamp

변환 기능으로 쓸 수도 있고, 날짜를 보여줄 형식을 지정해서 보여주는 필터입니다.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants