Public Shared Function TimeZoneName(ByVal dt As DateTime) As [String]
Dim sName As [String] = If(TimeZone.CurrentTimeZone.IsDaylightSavingTime(dt), TimeZone.CurrentTimeZone.DaylightName, TimeZone.CurrentTimeZone.StandardName)
Dim sNewName As [String] = ""
Dim sSplit As [String]() = sName.Split(New Char() {" "c})
For Each s As [String] In sSplit
If s.Length >= 1 Then
sNewName += s.Substring(0, 1)
End If
Next
Return sNewName
End Function
Dim sName As [String] = If(TimeZone.CurrentTimeZone.IsDaylightSavingTime(dt), TimeZone.CurrentTimeZone.DaylightName, TimeZone.CurrentTimeZone.StandardName)
Dim sNewName As [String] = ""
Dim sSplit As [String]() = sName.Split(New Char() {" "c})
For Each s As [String] In sSplit
If s.Length >= 1 Then
sNewName += s.Substring(0, 1)
End If
Next
Return sNewName
End Function
No comments:
Post a Comment