androidthings / contrib-drivers

Open source peripheral drivers
Apache License 2.0
558 stars 174 forks source link

Is there any way to set the correct date/time/timezone by Java? #94

Closed 562134391 closed 6 years ago

562134391 commented 6 years ago

thanks a lot

562134391 commented 6 years ago

I have Found it : TimeManager timeManager = TimeManager.getInstance(); timeManager.setTimeFormat(TimeManager.FORMAT_24); long timeStamp = TimeUtils.string2Millis("2018-03-26 11:17:22"); timeManager.setTime(timeStamp); in manifest: