• 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: NSTimezone and offset
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: NSTimezone and offset


  • Subject: Re: NSTimezone and offset
  • From: email@hidden
  • Date: Thu, 05 Sep 2013 13:49:50 +0900

You are confusing the method with secondsFromGMT

CDT is 3600 seconds is one hour ahead of CST and the docs could be more clear about this method being self referential rather than GMT referential.

Sent from my iPhone

On 2013/09/05, at 13:21, Lorenzo Thurman <email@hidden> wrote:

> Im working with NSTimezone and I need to get the current timezone offset, but I'm finding this more difficult than I think it should be. I thought it might just  be the way I'm looking at things, but I don't think so.
>
> If create an NSTimezone object and then send that object a daylightSavingTimeOffset message, I get back, for Chicago, 3600. This is wrong, at least for my purposes, for two reasons:
> 1) The offset should negative.
> 2) Chicago is currently observing DST
>
> The value I would expect to see returned should be -3000. I get why the value 3600 is correct at least with respect to the magnitude, as I can see I have this link setup for my system:
> /etc/localtime -> /usr/share/zoneinfo/America/Chicago
>
> But, why is it not negative? How do I get the correct offset.
> TIA
> _______________________________________________
>
> 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:
>

_______________________________________________

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


  • Follow-Ups:
    • Re: NSTimezone and offset
      • From: Lorenzo Thurman <email@hidden>
References: 
 >NSTimezone and offset (From: Lorenzo Thurman <email@hidden>)

  • Prev by Date: NSTimezone and offset
  • Next by Date: Debugging kCGErrorIllegalArgument: CGSUnionRegionWithRect : Invalid region
  • Previous by thread: NSTimezone and offset
  • Next by thread: Re: NSTimezone and offset
  • Index(es):
    • Date
    • Thread