• 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 15:27:29 -0700

> On Jul 30, 2014, at 2:23 PM, Chuck Soper <email@hidden> wrote:
>
> Your date string does not have a time zone. These internet date strings
> are always in UTC. Your string has a GMT offset.

OK, then my terminology was inaccurate. I am trying to get the GMT offset.
(And it’s not true that date/time strings are always in UTC. ISO8601 is, yes. But older formats like RFC822 often use time-zone names.)

> You could parse "-0700"
> to determine the GMT offset. It starts with a '+' or '-' followed by 2
> digits for hours, then 2 digits for minutes.

As I keep saying, I want to avoid if possible a solution that involves manually scraping the string. I have done it before, and it sucks, especially if you have to support large numbers of different date/time formats and variants thereof. (The date parser in Apple’s RSS/Atom engine ended up with something like 20 different format strings.)

> The following code will parse your time date string.

I already know how to parse the string, thanks.

—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: Chuck Soper <email@hidden>)

  • Prev by Date: Re: How to get the time zone of a parsed date/time string?
  • Next by Date: 10.5 Load Fonts for use in webview
  • 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