From Xojo Documentation

You are currently browsing the old Xojo documentation site. Please visit the new Xojo documentation site!

Read-Only Property (As Xojo.Core.TimeZone )
Xojo.Core.TimeZoneValue = aXojo.Core.Date.TimeZone

Supported for all project types and targets.

The time zone.

Sample Code

Get the time zone:

Var d As Date = Xojo.Core.Date.Now
Var tz As Xojo.Core.TimeZone
tz = d.TimeZone

To change a date to a new time zone, for example GMT:

// myDate is an existing date
Var GMTZone As New Xojo.Core.TimeZone("GMT")
Var GMTDate As New Xojo.Core.Date(myDate.SecondsFrom1970, GMTZone)