I had ordered some rubbermaid shelves from Amazon recently (since nobody locally sells them). Apparently Amazon.com has trouble getting the shelves too and sent me a message asking to approve a delay. Here's what I saw.

Now, either there's a bug in their time handling (passing a zero to localtime(), anyone?) or they've got a way cool time machine. Either way, it cracks me up. Just reading the text below the weird dates makes me smile.

Posted by jzawodn at October 29, 2005 10:26 AM

Reader Comments
# Mike said:

The result of trying to date format an invalid timestamp. PHP does this IIRC.

on October 29, 2005 11:14 AM
# graywolf said:

Isn't that a special data in the UNIX world?

on October 29, 2005 12:03 PM
# Michael said:

Amazon does not use PHP, they use Mason. But Perl has a localtime() function as well (it's just the C function in both cases.) So localtime(0) would indeed return Jan 1, 1970 GMT or Dec 31, 1969 PST.

on October 29, 2005 02:06 PM
# Yuval said:

Not necessarily 0, maybe an uninitialized scalar.
This is obviously a bug...
Not usings strict & warnings/diagnostics, are we, Amazon? :-)

on October 29, 2005 02:37 PM
# dan isaacs said:

Heh. Our internal order tracking system often puts "2069" as the year for the shipping date, until it's actually manufactured and close to shipping.

on October 29, 2005 03:51 PM
# Mike said:

Never said Amazon uses PHP. :/

on October 29, 2005 04:13 PM
# Christian G. Warden said:

It's somewhat comforting when companies as big as Amazon make these mistakes. Blockbuster onced shipped me a dvd labeled "1 of null".

on October 29, 2005 06:03 PM
# Mike said:

Heh, try using Amazon's web services sometime!

on October 29, 2005 06:16 PM
# Mike said:

So what was the point of bringing up PHP? A Unix timestamp of 0 or an invalid value that evaluates to 0 gives you that date in any language.

on October 29, 2005 07:00 PM
# Mike said:

Uh, for an example...

Amazon uses Mason? Really? Where'd you get that rumor from?

on October 29, 2005 07:28 PM
# Yuval said:

Mike - take a look at http://masonhq.com/?AmazonDotCom
I've seen some Amazon job offers at http://jobs.perl.org that have to do with Mason, too.

on October 30, 2005 01:37 AM
# addlinkat said:

amazom does not use php

on October 30, 2005 12:34 PM
# Daniel said:

That is pretty funny, I really do wonder what would make it display that date.

on November 1, 2005 07:10 AM
# gaby de wilde said:

Maybe the time-stamp is OK and the clock moved an hour or so. ^__^

on November 1, 2005 10:32 AM
# Scott@Amazon said:

Yes, Amazon is a heavy user of Mason and has a number of Mason experts (Jonathan Swartz among them).

Jeremy - your bug has been fixed. :)

on November 1, 2005 11:22 AM
# Jeremy Zawodny said:

Woohoo! Thanks.

on November 1, 2005 11:39 AM
Disclaimer: The opinions expressed here are mine and mine alone. My current, past, or previous employers are not responsible for what I write here, the comments left by others, or the photos I may share. If you have questions, please contact me. Also, I am not a journalist or reporter. Don't "pitch" me.


Privacy: I do not share or publish the email addresses or IP addresses of anyone posting a comment here without consent. However, I do reserve the right to remove comments that are spammy, off-topic, or otherwise unsuitable based on my comment policy. In a few cases, I may leave spammy comments but remove any URLs they contain.