Computing.Net > Forums > Unix > December 31, 1969

Computing.Net: Over 1,000,000 posts about all things technology related! Over 90% answered within 24 hours! Click here to sign up now, it's free!

December 31, 1969

Reply to Message Icon

Original Message
Name: kdumas
Date: December 23, 2004 at 07:27:06 Pacific
Subject: December 31, 1969
OS: Windows XP/Home
CPU/Ram: 500+
Comment:

I have a customer who has a shopping cart. She keeps getting orders with the date of 12/31/69. I believe I heard this was a unix problem. Can anyone shed some light on this. She wants this fixed and I want to know what I'm talking about when I approach the server who hosts her shopping cart. It is a PHP OS commerce shopping cart.


Report Offensive Message For Removal


Response Number 1
Name: Jim Boothe
Date: December 23, 2004 at 08:46:23 Pacific
Reply: (edit)

Yes, unix and some databases store their dates as an "epoch date" which is the number of seconds since Jan 1, 1970.

If a date field ends up as just zeros, that date would get interpreted as Jan 1, 1970 00:00 GMT. And when it gets adjusted to your particular time zone, that throws it back into the previous day.

Someone feel free to correct me if I have mis-stated anything.


Report Offensive Follow Up For Removal

Response Number 2
Name: nails
Date: December 29, 2004 at 07:43:05 Pacific
Reply: (edit)

Hi:

Jim has correctly described the epoch date.

Some databases allow undefined or null values for dates. I'm not an expert in this area, but I've heard of database vendors using the epoch date to flag a date as null.

I think what is happening is that your shopping cart application isn't communicating correctly with your database or perhaps there's a database setup option that needs to be tweaked. It's really hard to say.

Regards,

Nails


Report Offensive Follow Up For Removal







Post Locked

This post is quite old and has been locked from receiving new replies. Please create a new posting instead.


Go to Unix Forum Home








Do you have your own blog?

Yes
No
I did before
I will soon


View Results

Poll Finishes In 2 Days.
Discuss in The Lounge
Poll History




Data Recovery Software