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 8693593
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T00:34:47+00:00 2026-06-13T00:34:47+00:00

Try running this in iOS6 (haven’t tested pre iOS6): NSDateFormatter *julianDayDateFormatter = nil; julianDayDateFormatter

  • 0

Try running this in iOS6 (haven’t tested pre iOS6):

NSDateFormatter *julianDayDateFormatter = nil;
julianDayDateFormatter = [[NSDateFormatter alloc] init];
[julianDayDateFormatter setDateFormat:@"g"];

for (NSString *timeZone in [NSTimeZone knownTimeZoneNames]) {
    julianDayDateFormatter.timeZone = [NSTimeZone timeZoneWithName: timeZone];
    NSDate *date = [julianDayDateFormatter dateFromString:[NSString stringWithFormat:@"%d", 2475213]];
    if (date == nil)
        NSLog(@"timeZone = %@", timeZone);
}

and you get the following output:

America/Bahia
America/Campo_Grande
America/Cuiaba
America/Sao_Paulo

Can anyone explain why these four time zones behave like this with NSDateFormatter set to julian day numbers? All other time zones makes NSDateFormatter return actual NSDates.

  • 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-13T00:34:48+00:00Added an answer on June 13, 2026 at 12:34 am

    I have a suspicion. Only a suspicion, but a pretty strong one.

    That value represents October 19th 2064. The Brazilian time zones observe daylight saving time starting at local midnight – that’s when their clocks go forward, so midnight itself doesn’t exist. October 19th is one of those transitions.

    Here’s some sample code using Noda Time, my .NET date/time API. It checks whether the start of the day in every time zone it knows about is actually midnight:

    using System;
    using NodaTime;
    
    class Test
    {
        static void Main()
        {
            var localDate = new LocalDate(2064, 10, 19);
            var provider = DateTimeZoneProviders.Tzdb;
            foreach (var id in provider.Ids)
            {
                var zone = provider[id];
                var startOfDay = zone.AtStartOfDay(localDate).LocalDateTime.TimeOfDay;
                if (startOfDay != LocalTime.Midnight)
                {
                    Console.WriteLine(id);
                }
            }
        }
    }
    

    That produces a very similar list:

    America/Bahia
    America/Campo_Grande
    America/Cuiaba
    America/Sao_Paulo
    Brazil/East
    

    I suspect Brazil/East may be an alias for America/Sao_Paolo, which is why it’s not on your list.

    Anyway, to get back to your Julian day issue – I suspect the formatter always wants to return an NSDate * which is at the local midnight. That doesn’t exist for October 19th 2064 in those time zones… hence it returns nil. Personally I’d suggest it should return the 1am value instead, but hey…

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

Sidebar

Related Questions

Try running this in a .VBS file MsgBox(545.14-544.94) You get a neat little answer
I am running NServiceBus and having this issue . To try and troubleshoot it
When running this code (go ahead, try it): library(ggplot2) (myDat <- data.frame(cbind(VarX=10:1, VarY=runif(10)), Descrip=sample(LETTERS[1:3],
Running this: @try { NSLog(@1. autocapitalizationType = %d, [self.textField autocapitalizationType]); NSLog(@2. autocapitalizationType = %@,
This compiles fine, although I wouldn't want to try running it just yet. However
I have this workspace downloaded off the web and I try running it on
I keep getting this error every time I try running my test just by
I'm running this code to try to make a page reload after I closed
I'm running this command in a Python script: try: print sql_string cursor.execute(sql_string) except: print
I try running multiple times: git checkout mygithub/master Unfortunately it doesn't check out this

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.