List:General Discussion« Previous MessageNext Message »
From:Martin Ramsch Date:October 9 1999 5:25pm
Subject:Re: unix_timestamp function fails for dates before 1970
View as plain text  
On Sat, 1999-10-09 07:32:05 -0000, Mark-Jason Dominus wrote:
> >Description:
> 
> unix_timestamp fails for dates before 1970.
[...]
> >Fix:
> 
> I don't have one yet.

And there won't be one, because Unix timestamps, or better called Unix
epochs (to better distinguish them from the datetime display format of
MySQL's timestamp fields), are only defined for dates starting with
1970-01-01 00:00:00!

If MySQL can handle negative epoch values in some cases, this can be
considered to be an accidental side effect of the current
implementation, but it's no defined behaviour you can rely on!

Regards,
  Martin
-- 
Martin Ramsch <m.ramsch@stripped> <URL: http://home.pages.de/~ramsch/ >
PGP KeyID=0xE8EF4F75 FiPr=5244 5EF3 B0B1 3826  E4EC 8058 7B31 3AD7
Thread
unix_timestamp function fails for dates before 1970mjd9 Oct
  • Re: unix_timestamp function fails for dates before 1970Martin Ramsch9 Oct
  • Re: unix_timestamp function fails for dates before 1970Paul DuBois9 Oct
    • Re: unix_timestamp function fails for dates before 1970Mark-Jason Dominus13 Oct
      • Re: unix_timestamp function fails for dates before 1970Bob Kline13 Oct
        • Re: unix_timestamp function fails for dates before 1970Mark-Jason Dominus13 Oct
          • Re: unix_timestamp function fails for dates before 1970Michael Widenius14 Oct