Computer Problems? Computing.Net has over 1,000,000 posts about all things technology related! Over 90% answered within 24 hours! Click here to start participating now! Also, be sure to check out the New User Guide.
December 31, 1969
Name: kdumas Date: December 23, 2004 at 07:27:06 Pacific 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.
Name: Jim Boothe Date: December 23, 2004 at 08:46:23 Pacific
Reply:
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.
0
Response Number 2
Name: nails Date: December 29, 2004 at 07:43:05 Pacific
Reply:
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.
Summary: Hi Nails... Thanks for the reply. Just wondering, is it not possible to utalise the Unix program "Cal". This gives day, date, month, and year....? The Cal program will take the values in the format "m...
Summary: Please reference your man pages for 'date' or 'strftime' and you should find formatting commands like the sample below. I don't see an epoch representation. It can be done with perl modules though if ...