Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7714875
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 1, 20262026-06-01T02:14:39+00:00 2026-06-01T02:14:39+00:00

yes this is an iOS programming question. I need to calculate the exact time

  • 0

yes this is an iOS programming question.

I need to calculate the exact time the RMS Titanic sank for its 100 yr anniversary.

It sunk at 15th April 1912 2:20 a.m. 

Stupid Question you say. 100th year anniversary is

15th April 1912 2:20 a.m. 
+100 years
15th April 2012 2:20 a.m. 

But I want an alarm to go off in any timezone in the world exactly and need to handle timezones, and things like British Summer Time being one hour ahead yet it didnt come into effect till 1918…. but as of today 25 mar 2012 London IS in BST so one hour ahead.

Im confused on timezones. We have GMT and UTC. The ships sank at 49° 56′ 49″ W, 41° 43′ 32″ N so few hours ahead of London.
-49.94822196927015
41.72713826043066

Whats the correct way to enter a historic date into NSCalendar 
and to add 100 years to it exactly and get back the right time 
in the users current timezone?

I notice theres Japanese and Islamic calender formats in NSCalendar options. Can iOS device change their dates to these calendars?
And if this was the case. how would I convert from Gregorian to say Islamic?

nice brain puzzler to start your week 🙂

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-01T02:14:40+00:00Added an answer on June 1, 2026 at 2:14 am

    (There’s no code here, as I’ve never used the iOS API. However, I have some experience of date/time APIs and the oddities they throw up, so I hope you find this answer useful anyway.)

    What’s the correct way to enter a historic date into NSCalendar
    and to add 100 years to it exactly and get back the right time
    in the users current timezone?

    It really depends on what you mean by “100 years” – it’s not like that’s a fixed amount of time really.

    I would take the UTC instant at which it sank, apply the user’s local time zone, and then add a hundred years to that. However, you then need to consider that the result may not actually be a valid local time in that time zone.

    For example, suppose you’re in a time zone where at the instant of the sinking, it was 1:20am… but in that time zone, 15th April 2012 is when the clocks change – and they skip from 1am to 2am. In that case, 1:20am never occurs… so you could potentially pick 12:20am, the instant before the DST transition, the instant of the DST transition, or 2:20am, depending on what you think is appropriate.

    Another possibility to consider is the opposite – suppose it’s a DST transition which goes from 2am to 1am… so 1:20am actually occurs twice. What would you want to do in that case? You probably shouldn’t make your app celebrate the anniversary twice!

    Another option which removes this possibility of ambiguity and discrepancy is to work out what the offset from UTC in the user’s time zone was at the exact time of the sinking, then add 100 years to the UTC value (which will never have any DST transitions) and apply the same offset again.

    I notice theres Japanese and Islamic calender formats in NSCalendar options. Can iOS device change their dates to these calendars? And if this was the case. how would I convert from Gregorian to say Islamic?

    I don’t know on that front, I’m afraid.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Yes, this is a programming-related question, if a little indirectly. For better or worse,
This question falls into the yes - this works, yes - this is ugly,
I know the Sales pitch answer is yes to this question, but is it
I need a quick yes/no answer on this... Is it possible to get a
Is this combination possible at all? If yes, will I still need to buy
When I asked this question I got almost always a definite yes you should
So I realize this question sounds stupid (and yes I am using a dual
this is a follow-up question to my last one here: iOS: Initialise object at
This question is about iOS device rotation and multiple controlled views in a UINavigationController.
Note: This question is outdated— viewDidUnload is deprecated iOS 6. When does UIViewController's viewDidUnload

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.