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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 14, 20262026-05-14T06:53:25+00:00 2026-05-14T06:53:25+00:00

I have been helping someone debug some code where the error message was Day

  • 0

I have been helping someone debug some code where the error message was “Day too big”. I know that this springs from localtime and the Y2038 bug (most google results appear to be people dealing with cookies expiring well into the future).

We appear to have ‘fixed’ the problem by using time to get the current date. However, given that none of our original dates should have hit the 2038 issue I’m sceptical that we’ve actually fixed the problem …

Are there other instances that anyone knows of where one would hit “day too big”?

OS is Solaris.

Sample code – the actual code is quite large and the person I’m working with hasn’t actually isolated the offending part (which is why I’m worried the ‘fix’ is not actually a fix). If I can put together something concise which reproduces the issue I will post!

UPDATE

I isolated the bit of code, put some print statements around everything and have solved the problem …

The offending line of code was:

$temp = str2time(localtime());

This was often (but not always) setting $temp as undef. It turns out that even when $temp was being set it wasn’t being set with the expected value.

The gotcha is that localtime() returns an array in most contexts … and that’s what’s messing up the call to str2time.

By changing this to:

$ltime = localtime;
$temp = str2time($ltime);

the problem goes away.

Of course, better yet, just use:

$temp = time;
  • 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-05-14T06:53:26+00:00Added an answer on May 14, 2026 at 6:53 am

    There’s a “Day too big” message from the Time::Local package. The source code is here if you want to investigate further.

    The Carp::Always module might be helpful here. Run the offending code with

    perl -MCarp::Always script.pl arg1 arg2 ...
    

    and wherever you got a warning before, you will now get a full stack trace.

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

Sidebar

Ask A Question

Stats

  • Questions 392k
  • Answers 392k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team
    Editorial Team added an answer In none of your choices have you considered whether you… May 15, 2026 at 1:51 am
  • Editorial Team
    Editorial Team added an answer hey dragon there wont be any problem if u just… May 15, 2026 at 1:51 am
  • Editorial Team
    Editorial Team added an answer You never want to edit a core module like taxonomy,… May 15, 2026 at 1:51 am

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

Top Members

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.