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

  • Home
  • SEARCH
  • 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 8315761
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 8, 20262026-06-08T21:12:19+00:00 2026-06-08T21:12:19+00:00

an iPhone client send a date to a Java server as Apple’s Cocoa framework

  • 0

an iPhone client send a date to a Java server as Apple’s Cocoa framework Epoch (which the ms since 2001) and when you converted to java date (since 1970) it convert as 1980 for the year 2011, is adding 30 year to Cocoa date will converted ? or is there any other methode that i could use for this conversion ?

  • 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-08T21:12:21+00:00Added an answer on June 8, 2026 at 9:12 pm

    I would recommend adjusting the seconds to the Unix epoch time (since 1970) by adding the appropriate number of seconds, instead of bumping up the year. I’m not positive, but my instincts tell me that bumping the year itself will be wrong in some cases (with leap years and small adjustments to the calendar, etc).

    If you need to add seconds to seconds since Jan 1 2001, the number you’re looking for is +978307200. If you need millis, just multiply by 1000.

    As an example, I had some code that needed to detect Apple vs Unix epoch dates in seconds since epoch, and convert them into Java Dates that took milliseconds since Unix epoch in the constructor:

    // Earlier than 1985 in Unix, must be Apple
    if(date < 473410800) {
        m.date = new Date((date + 978307200L) * 1000);
    } else {
        m.date = new Date(date * 1000);
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

My iPhone client app uploads a data to the server, which runs on PHP.
I'm working on an iPhone app that requires a basic client/server interaction model. For
I'm writting an iPhone client that downloads stuff from the net. Since the cellular
I am writing a client server iPhone app. The server is J2EE based. I
I'm attempting to send a .proto message from an iPhone application to a Java
Am trying to implement a Java program which sends an Apple Push Notification to
I am developing an xmpp client for iphone. i am able to send and
I have a client application (iPhone) that collects 10,000 doubles. I'd like to send
I'm developing a iPhone app and need to send it to my client. In
i am making a client server program for iphone communication with the sever i

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.