Hello. I would like to get the user’s current timezone, but when I deploy to Xojo Cloud, it seems to be reverting to the default GMT timezone. Tried the following
dim d as DateTime = DateTime.Now
dim d as DateTime = DateTime.Now(TimeZone.Current)
dim d as DateTime = DateTime.Now(New TimeZone(TimeZone.Current)) 'this one give an error
The first two work in debug but show the GMT when deployed to XC
Thanks Alberto, but I must still be doing something wrong. The following still show GMT
dim d as DateTime = Session.ClientTime.Now
dim d as DateTime = Session.ClientTime.Now(New TimeZone(TimeZone.Current.Abbreviation))
dim d as DateTime = Session.ClientTime.Now(New TimeZone(Session.ClientTime.Timezone.Current.Abbreviation))
dim d as DateTime = DateTime.Now(New TimeZone(Session.ClientTime.Timezone.Current.Abbreviation))