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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 11, 20262026-05-11T02:44:32+00:00 2026-05-11T02:44:32+00:00

I have a piece of code in ANSI C which uses the time.h library

  • 0

I have a piece of code in ANSI C which uses the time.h library and time_h structures to (amongst other date-related calculations) work out the interval between two given dates. This works fine but this limits my code to input between 1970 and 2038. I would now like to make my code more general.

Is there a common C library (ANSI or C99 standard) which implements date calculations on ranges larger than time.h, on a granularity of 1 day (i.e. I need to-the-day resolution but hour resolution is not necessary)?

(I’m adapting the code to deal with historical events hence it would be nice if it could also deal with dates in B.C. ….)

  • 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. 2026-05-11T02:44:33+00:00Added an answer on May 11, 2026 at 2:44 am

    Yes, the y2038 project is reimplementing time.h to be 2038 safe. So far gmtime(), localtime(), mktime() and gmtime() are done and well tested. Those were the hard bits. It spans about 300 billion years in either direction.

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

Sidebar

Related Questions

I have piece of code which I use to format a range of cells
I have piece of javascript code, which should process when the browser window is
I have this piece of code which works, however I would like to change
I have this piece of code which is running perfectly on localhost but throws
I have a piece of code that uses Microsoft-specific extension to the C++: interface
I have this piece of code which gives to SAXParseError i.e., it is not
I have a piece of code which creates a std::vector<T> with a known size:
I have piece of code which generates some Random number and prints out on
I have below piece code which runs on JDK5 private static ThreadLocal<String> messages =
I have some piece of code in my Website which adds the details into

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.