This repository was archived by the owner on Nov 6, 2024. It is now read-only.

Description
Currently, Time.now.local converts the UTC to CEST which is local for Denmark only. For people from other countries, to use the toit script, an inbuild timezone function could do good.
I wrote a code to convert from UTC to IST (Indian Standard Time).
main:
time := Time.now.utc
timeh := time.h + 5
timem := time.m + 30
timeday := time.day
if timem > 60:
timeh = timeh + 1
timem = timem - 60
if timeh >= 24:
timeday = timeday + 1
timeh = timeh - 24
print "Time: $(%02d timeh):$(%02d timem)"
print "Date: $(%04d time.year)-$(%02d time.month)-$(%02d time.day)"
I have only started with toit, hoping to learn and make great projects out of it.