1

Closed

GetAbbreviation() function not working

description

I was attempting to return the time zone abbreviation for the "America/Phoenix" time zone in VB.NET using the following code:

Dim abbrev as String
abbrev = PublicDomain.TzTimeZone.GetTimeZone("America/Phoenix").GetAbbreviation

However this code will return an abbreviation of "America/Phoenix" instead of "MST" as expected. I also noticed that this problem occurrs for the following time zone olson time zones: America/Anguilla, America/Aruba, America/Regina, America/Swift_Current, and Pacific/Honolulu. I was wondering if anyone has any suggestion as to how to resolve this issue.
Closed Aug 19, 2007 at 10:27 PM by schizoidboy

comments

schizoidboy wrote Aug 19, 2007 at 10:21 PM

This was a pretty simple bug where if the zone's format modifier didn't have replacement strings (e.g. %s), we fell back to the zone name.