Platforms to show: All Mac Windows Linux Cross-Platform

Back to CFTimeZoneMBS class.

CFTimeZoneMBS.Abbreviation(atTime as CFAbsoluteTimeMBS) as CFStringMBS

Type Topic Plugin Version macOS Windows Linux iOS Targets
method CoreFoundation MBS MacCF Plugin 3.2 ✅ Yes ❌ No ❌ No ✅ Yes All
The abbreviation for the given timezone name.
Example
dim t as new CFTimeZoneMBS
MsgBox t.Abbreviation(nil)

Returns nil on any error.
As the name may change depending on whether it's daylight saving time, you should give an absolute time value.

CFTimeZoneMBS.Constructor

Type Topic Plugin Version macOS Windows Linux iOS Targets
method CoreFoundation MBS MacCF Plugin 10.0 ✅ Yes ❌ No ❌ No ✅ Yes All
A constructor which fills the object with the system timezone.
Example
dim CFDateLocal as new CFAbsoluteTimeMBS
dim CFTimeZone as new CFTimeZoneMBS

dim MyDSTState as Boolean = CFTimeZone.IsDaylightSavingTime(CFDateLocal)

MsgBox str(MyDSTState)

CFTimeZoneMBS.Data as CFBinaryDataMBS

Type Topic Plugin Version macOS Windows Linux iOS Targets
method CoreFoundation MBS MacCF Plugin 3.2 ✅ Yes ❌ No ❌ No ✅ Yes All
The binary data for the timezone.
Example
dim t as new CFTimeZoneMBS
MsgBox t.Data.Str

CFTimeZoneMBS.IsDaylightSavingTime(atTime as CFAbsoluteTimeMBS) as boolean

Type Topic Plugin Version macOS Windows Linux iOS Targets
method CoreFoundation MBS MacCF Plugin 3.2 ✅ Yes ❌ No ❌ No ✅ Yes All
whether it's daylight saving time at the given absolute time.
Example
// get current timezone
dim c as CFTimeZoneMBS = SystemCFTimeZoneMBS

// and current time
dim time as CFAbsoluteTimeMBS = CurrentCFAbsoluteTimeMBS

// Do we have daylight saving time?
MsgBox str(c.IsDaylightSavingTime(time))

CFTimeZoneMBS.Name as CFStringMBS

Type Topic Plugin Version macOS Windows Linux iOS Targets
method CoreFoundation MBS MacCF Plugin 3.2 ✅ Yes ❌ No ❌ No ✅ Yes All
The name of the timezone.
Example
dim s as CFTimeZoneMBS
s=SystemCFTimeZoneMBS
MsgBox s.Name

CFTimeZoneMBS.SecondsFromGMT(atTime as CFAbsoluteTimeMBS) as CFTimeIntervalMBS

Type Topic Plugin Version macOS Windows Linux iOS Targets
method CoreFoundation MBS MacCF Plugin 3.2 ✅ Yes ❌ No ❌ No ✅ Yes All
Returns the time difference to GMT for the given time (for daylight saving).
Example
dim s as cfTimeZoneMBS
s=SystemCFTimeZoneMBS
MsgBox str(s.SecondsFromGMT(nil).Value) // 3600 in Germany

Returns nil on any error.

The items on this page are in the following plugins: MBS MacCF Plugin.


The biggest plugin in space...