• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: How to get the time zone of a parsed date/time string?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: How to get the time zone of a parsed date/time string?


  • Subject: Re: How to get the time zone of a parsed date/time string?
  • From: Jens Alfke <email@hidden>
  • Date: Wed, 30 Jul 2014 12:08:39 -0700

> On Jul 30, 2014, at 11:59 AM, Alex Zavatone <email@hidden> wrote:
>
> Hmmm.  OK.  I reread your original post.
>
> Isn't there timeZoneWithAbbreviation: within NSTimeZone that allows this?

*facepalm*

I did not ask how to convert a time zone string to an NSTimeZone object.

I asked how to parse the time zone out of an ENTIRE FORMATTED DATE/TIME STRING that's in some arbitrary format.
The result from NSDateFormatter is an NSDate object, which does not contain any time zone info.

Alex, I think you’re jumping to the conclusion that of course I would hack into the string and scrape out the part of it containing the time zone. Actually no, I am avoiding that if humanly possible. I’ve been down that road before and it ends with writing your own date parser, which is a nightmare. Date parsing is ugly and complicated and I want to leave it to ICU.

—Jens
_______________________________________________

Cocoa-dev mailing list (email@hidden)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden


References: 
 >How to get the time zone of a parsed date/time string? (From: Jens Alfke <email@hidden>)
 >Re: How to get the time zone of a parsed date/time string? (From: Alex Zavatone <email@hidden>)
 >Re: How to get the time zone of a parsed date/time string? (From: Jens Alfke <email@hidden>)
 >Re: How to get the time zone of a parsed date/time string? (From: Alex Zavatone <email@hidden>)

  • Prev by Date: Re: How to get the time zone of a parsed date/time string?
  • Next by Date: Re: start with OSX 5.1.1
  • Previous by thread: Re: How to get the time zone of a parsed date/time string?
  • Next by thread: Re: How to get the time zone of a parsed date/time string?
  • Index(es):
    • Date
    • Thread