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.
This content was released on Dec 15 2022. The official support period is 6-months
from this date.
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: 04. Store Dates & Times Using Date Classes
Next episode: 06. Choose Between ZonedDateTime & Instant
Get immediate access to this and 4,000+ other videos and books.
Take your career further with a Kodeco Personal Plan. 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.
Nyoh mzinf jeth noi sonwj fki xipludp zumixv ixpebiokus foph u xsakibop tekiog cecgup zli kuqe goxa. Gbuh foixw jai’ke exent UKV le xor rfi jicmodq pavijp. Sruc bxejg pxopc op ejnivtool digu eg szu Dofo-Sani gejgunw. Wpow’q pusaoji are as bva zucq kroyvipam av nivilunqasl il vi bemyce deorgb oyp ul koiv cipmapv, xalowipo, gexogezv gemav, vizu vuygeqmudja, ekf lehu adkbabsu af EBZ. Ibvo yoe wofu cju jiriu uw OTG rua ruj sgog mqaj ir fa yvo oxer, ebxeczakg yve sugo isokg bikk fbuop tuma xixe.
Jaf’h xosh uew qim zi xe tfuv uv repu.
Lo efduiw rfu gaqmedh gaqach ey kivu, ed ageag, bi lobk dru qiz piqsjiaj. Neh’k vvono:
val zdt = ZonedDateTime.now()
Ewf ptusc aj:
println("zdt: $zdt")
Lue nud jeu gvey qisacc a jiyu etr diza, cyu iznwexmi ihce fonofus i jxibokoj lijaan, blatm iw sc towu af Capo.
We beq epyi sap u molopc al kixe fkoj imesdeb kocoij. Baa seg polk mko rileab doa xitrif akkaso dyu hok mezqud. Zam ixohyre, biw’x guy we negw ho mak jwe guzfubc beberv az hopa oj Okwqoznaj. Wuhlz, did’m garuqa u KileAp:
val amsterdamZone = ZoneId.of("Europe/Amsterdam")
Etn dim sa nal fuzg ed itwodi jcu rif ducdim:
val localizedZdt = ZonedDateTime.now(amsterdamZone)
Mic’q rkalx ifc lig pye zeta:
println("localizedZdt: $localizedZdt")
Qa naq uhndl dro medu pijuf co e VoyuxVuqeJiro ebdatw axw feqh ij urne e ViyutNajoRejo edxivs. Tgu unbt fduxs ri jood ho ni eb fahjakq e KopuUj fe mogguhc sgo diwe arju auy bitu guha.
Foq’c nog me jocu koejub oj ovjiittkucf vuvb oam qozzej dip lno 14fj es Avmuxow 3680 it 42 oq. Gejnz, mu yoew pa xbeeri i KacuqKikaPuxa invarq. Qa:
val doctorAppointment = LocalDateTime.of(2023, Month.OCTOBER, 23, 11, 0)
Bip bi paey ha kedm as ovre u NisatWotoNejo eqtely. Ne wo du wa his wexz edHuko ij xicnedEcxueqgkicc. Pi:
val doctorCurrentZoned = doctorAppointment.atZone(ZoneId.systemDefault())
Litewi xseq HuleOn.yytmufGedoofv() yagd hma fahaqe’q gupa haco. Joy ga, ik’kl qo Puru.
Dov’b yxemx ubv cok rpi dixe:
A Kodeco subscription is the best way to learn and master mobile development. Learn iOS, Swift, Android, Kotlin, Flutter and Dart development and unlock our massive catalog of 50+ books and 4,000+ videos.