Android 가 현재 시간의 android.text.format.Time 을 가 져 오 는 데 시간 이 지 났 습 니 다.
Time time = new android.text.format.Time();
time.setToNow();
String timeNow = time.format("%Y%m%d%H%M%S");
현재 시간 을 가 져 옵 니 다.하지만 android 22 에서 시간 이 지난 deprecated 를 알려 줍 니 다.
그리고 찾 아 보 니 어느 것 을 써 야 좋 을 지 모 르 겠 어 요.이것 을 시험 해 볼 수 밖 에 없 었 어 요.
Calendar calendar = Calendar.getInstance();
String timeNow = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(calendar.getTime());
다행히 당분간 문 제 를 발견 하지 못 했다.
그런데 방금 글 을 봤 어 요.
http://tangmingjie2009.iteye.com/blog/1543166
이 방법 이 가장 느리다 고 합 니 다.가장 빠 른 것 은...
System.currentTimeMillis()
과연 그 럴 까?하기 귀찮다
이 내용에 흥미가 있습니까?
현재 기사가 여러분의 문제를 해결하지 못하는 경우 AI 엔진은 머신러닝 분석(스마트 모델이 방금 만들어져 부정확한 경우가 있을 수 있음)을 통해 가장 유사한 기사를 추천합니다:
【GAS】Google 캘린더의 예정을 Slack 통지슬랙에 Google 캘린더 일정을 알리고 싶습니다. 아침 8시에 실행하여 대략 1일의 예정을 통지한다 slack의 내 프로필 → 환경 설정 → 메시지 및 미디어에서 Slack으로 메일 전송 사용 이메일 주소를 복사합...
텍스트를 자유롭게 공유하거나 복사할 수 있습니다.하지만 이 문서의 URL은 참조 URL로 남겨 두십시오.
CC BY-SA 2.5, CC BY-SA 3.0 및 CC BY-SA 4.0에 따라 라이센스가 부여됩니다.