TimeZone Abbreviation

Xojo.Core.TimeZone’s Abbreviation property doesn’t seem to be an abbreviation in the way I’d expect. For example, I’d expect EDT to be the abbreviation for NYC at the moment. This is also what the abbreviation property of an NSTimeZone gives me from Swift/Obj-C. But from Xojo, abbreviation gives me America/New_York.

So, two questions:

  1. Is this a bug or intended behavior? It doesn’t seem much of an abbreviation.
  2. If it’s actually intended, it’s not named very well. Could we have a property to access the actual abbreviated time zone?

Many thanks.

<https://xojo.com/issue/39315>

[quote=186292:@Gavin Smith]Xojo.Core.TimeZone’s Abbreviation property doesn’t seem to be an abbreviation in the way I’d expect. For example, I’d expect EDT to be the abbreviation for NYC at the moment. This is also what the abbreviation property of an NSTimeZone gives me from Swift/Obj-C. But from Xojo, abbreviation gives me America/New_York.

So, two questions:

  1. Is this a bug or intended behavior? It doesn’t seem much of an abbreviation.
  2. If it’s actually intended, it’s not named very well. Could we have a property to access the actual abbreviated time zone?

Many thanks.[/quote]

Looks like this uses what the system provide. If so, that won’t be consistent between platforms, as Windows uses other cities references. It would be much better to have something like GMT-6.

As I said, on the Mac Objective-C gives me EDT for the NSTimeZone.abbreviation property. So Xojo doesn’t seem to be using the system abbreviation.

Also, I don’t really care if it uses GMT-6 or some other form of abbreviation - just as long as it’s an abbreviation that can identify a timezone.

I am referring to the Date and time preferences. There “closest city” is “New York, NY - United States”.

Whatever Xojo did, it is imprecise and wrong.

What you are seeing is the IANA time zone and should not only be cross platform, but cross implementation as well. I don’t see any way they screwed that up, aside from potentially the property name.

Right, it seems to simply be a misnamed property. And if it is, I’d like to have access to the actual abbreviation property (NSTimeZoneInstance.abbreviation).