sealed class TimeZone : Comparable<TimeZone>
A time zone.
(iosArm64, iosX64, jvm, macosX64, tvosArm64, tvosX64, watchosArm64, watchosX86)
FixedOffset |
A time zone defined by a fixed offset from UTC. class FixedOffset : TimeZone |
(iosArm64, iosX64, jvm, macosX64, tvosArm64, tvosX64, watchosArm64, watchosX86)
Region |
A named time zone, typically corresponding to a region identifier in the IANA Time Zone Database, but may be any name that can be understood by a TimeZoneRulesProvider. class Region : TimeZone |
(iosArm64, iosX64, jvm, macosX64, tvosArm64, tvosX64, watchosArm64, watchosX86)
id |
An ID that uniquely identifies the time zone. abstract val id: String |
(iosArm64, iosX64, jvm, macosX64, tvosArm64, tvosX64, watchosArm64, watchosX86)
isValid |
Check if this is a valid time zone according to the current time zone rules provider. abstract val isValid: Boolean |
(iosArm64, iosX64, jvm, macosX64, tvosArm64, tvosX64, watchosArm64, watchosX86)
rules |
Get the rules associated with this time zone. abstract val rules: TimeZoneRules |
(iosArm64, iosX64, jvm, macosX64, tvosArm64, tvosX64, watchosArm64, watchosX86)
compareTo |
open fun compareTo(other: TimeZone): Int |
displayName |
A textual representation of the time zone, suitable for display purposes. The localized name will be returned, if available for the locale in the specified style. If not, the id will be returned instead. (jvm)fun displayName(style: TimeZoneTextStyle, locale: Locale = defaultLocale()): String(iosArm64, iosX64, macosX64, tvosArm64, tvosX64, watchosArm64, watchosX86) fun displayName(style: TimeZoneTextStyle, locale: <ERROR CLASS> = defaultLocale()): String |
localizedName |
The localized name of the time zone, if available for the locale in the specified style. The result depends on the configured TimeZoneTextProvider and may differ between platforms. (jvm)fun localizedName(style: TimeZoneTextStyle, locale: Locale = defaultLocale()): String?(iosArm64, iosX64, macosX64, tvosArm64, tvosX64, watchosArm64, watchosX86) fun localizedName(style: TimeZoneTextStyle, locale: <ERROR CLASS> = defaultLocale()): String? |
(iosArm64, iosX64, jvm, macosX64, tvosArm64, tvosX64, watchosArm64, watchosX86)
normalized |
Get a normalized time zone. abstract fun normalized(): TimeZone |
(iosArm64, iosX64, jvm, macosX64, tvosArm64, tvosX64, watchosArm64, watchosX86)
toString |
open fun toString(): String |
(iosArm64, iosX64, jvm, macosX64, tvosArm64, tvosX64, watchosArm64, watchosX86)
validate |
Check if the time zone is valid and throw an exception if it isn't. fun validate(): Unit |
(iosArm64, iosX64, jvm, macosX64, tvosArm64, tvosX64, watchosArm64, watchosX86)
validated |
Ensure that the time zone is valid, throwing an exception if it isn't. fun validated(): TimeZone |
(iosArm64, iosX64, jvm, macosX64, tvosArm64, tvosX64, watchosArm64, watchosX86)
UTC |
A fixed time zone representing UTC. val UTC: TimeZone |
(iosArm64, iosX64, jvm, macosX64, tvosArm64, tvosX64, watchosArm64, watchosX86)
FixedOffset |
Create a fixed-offset TimeZone from an identifier in the form of fun FixedOffset(id: String): FixedOffset |
(jvm)
toJavaZoneId |
Convert to an equivalent Java fun TimeZone.toJavaZoneId(): ZoneId |
(iosArm64, iosX64, jvm, macosX64, tvosArm64, tvosX64, watchosArm64, watchosX86)
FixedOffset |
A time zone defined by a fixed offset from UTC. class FixedOffset : TimeZone |
(iosArm64, iosX64, jvm, macosX64, tvosArm64, tvosX64, watchosArm64, watchosX86)
Region |
A named time zone, typically corresponding to a region identifier in the IANA Time Zone Database, but may be any name that can be understood by a TimeZoneRulesProvider. class Region : TimeZone |