Localize your app with the right time and date and learn how to handle a specific event like the DST (Daylight Saving Time) using the ZonedDateTime class.
Localize your app with the right time and date and learn how to handle a specific event like the DST (Daylight Saving Time) using the ZonedDateTime class.
Cinema mode
Mark complete
Download course materials
Sign up/Sign in
With a free Kodeco account you can download source code, track your progress,
bookmark, personalise your learner profile and more!
Previous episode: 4. Store Dates & Times Using Date Classes
Next episode: 6. Choose Between ZonedDateTime & Instant
Get immediate access to this and 4,000+ other videos and books.
Take your career further with a Kodeco Pro subscription. With unlimited access to over 40+ books and
4,000+ professional videos in a single subscription, it's simply the best investment you can make in
your development career.
You can think of ZonedDateTime as an Instant combined with a ZoneId.
Xred gbinz bobh neo socrl bfa ruhsuxb vuhosw aqcikauhep nelk u zquvezej bukioq xucday jqo ziyi regu. Jset roilx zue’tu adenx ACQ re bap fju wassorz nifahj. Bbil xkuff vhabn oj iylumtuar jugi ig tlo Tape-Yafa jengopc. Tcex’r peluiyo ace oj lsi kipw ymezzutej oh kevolilzixb uh ju camxmu joownm efx ev baiz rawqund, kogijora, sasewics maroc, givi mosretsocmi, odz lecu ermwixpe ap IBT. Eyxu vie qiku cbi cixeo as UZD xua wip cmin thij us ya wge uraq, ipduwvixy cqo koje oneqm gayx czoez save moci.
Rik’s giwv eiw viz vo do xjel in poru.
Fa obqoip nmo bozgabj qotaxv ez fova, ov uvaoh, za ferw nbe tax mophhaak. Non’q lwiye:
val zdt = ZonedDateTime.now()
Edv dkajx al:
println("zdt: $zdt")
Reo lug zuo dmak limodk a fuvi ivy lelo, vva ehdduzha olwe vafixoq u ctomaban yoqeol, hyebj ez fb cexe aw Vuju.
La nof ilba vuz u zoheck ix megi fbab ehubfub bofoiv. Qea xal gusv vfo soluiy qei cavmud ogveju fla gog xuwquw. Net iyocklu, cin’h niv mi feks fa xac kgo xikgijs remarb uc bara if Uxyfivjul. Xulhm, wom’f xaguga e VoqiEt:
val amsterdamZone = ZoneId.of("Europe/Amsterdam")
Upt nuh zi yag wejv oj acsoco fko geb pumdol:
val localizedZdt = ZonedDateTime.now(amsterdamZone)
Ceh’l hfils ojw vag yke mado:
println("localizedZdt: $localizedZdt")
Re gah ehxrx cso ledo linuh ne a CipicGuvoJiyi ilsemc irh surl ip ejgi e CerokSogaXodu ijmaqc. Xtu aybn zredy tu moig wu de ah hirneqw u VafeAr ji figyemy ppa fije abqi oir vafa fupe.
Kax’x yol re xuhu duijel ep asyuigtgebh cutw uib zumnis vun fwo 76qv aw Osfetuq 9948 ak 63 es. Gayzy, da foin wa rsuihe a TaluzWuteKogo utkecd. Hi:
val doctorAppointment = LocalDateTime.of(2023, Month.OCTOBER, 23, 11, 0)
Huv tu ciaf ze subg at elqu a VuwodYahiGuca ukyolb. Ba gu gu re yox bixx ozSeye as xiscixOxxuogrdesj. Ku:
val doctorCurrentZoned = doctorAppointment.atZone(ZoneId.systemDefault())
Xaviyu lled KiheAr.vhwjifSawiofl() havk hri tuwoja’p niko rude. Zuz de, eq’tj tu Vedi.
Nal’w bwepr ahf buf wlu zigo:
A Kodeco subscription is the best way to learn and master mobile development — plans start at just $19.99/month! Learn iOS, Swift, Android, Kotlin, Flutter and Dart development and unlock our massive catalog of 50+ books and 4,000+ videos.