This is a related but different question/comment. In the six or so years of using MySQL, my various teams have never used anything except an unsigned INT and UNIX Epoch time to record timestamps. The given is, of course, we have always been a Perl/C/C++/UNIX shop, and we will be for a long time, at least. :-) I have looked at the growing list of MySQL date/time functions from time to time, and have always come to the conclusion that Epoch time is the best way for us to store date/time.
Another given is that we don't need to save sub-second time stamps. I won't go into the pros of Epoch time. I'll just say that we've never found it wanting. I guess the cost is having queries like "where ts < (other_ts - (3600 * 24 * 7))", etc. Perl, our primary language, makes at an absolute breeze to convert to/from Epoch time. Can anyone share and/or comment about the use of Epoch time, especially the hazards? I'm asking because I want to make sure that I haven't built a comfortable little box that un-necessarily excludes some useful functions. :-) Cheers. -Dana > -----Original Message----- > From: Keith C. Ivey [SMTP:[EMAIL PROTECTED]] > Sent: Monday, December 23, 2002 9:16 AM > To: [EMAIL PROTECTED] > Cc: Akash > Subject: Re: TimeStamp in MySQL reqd NULL > > On 23 Dec 2002, at 16:11, Akash wrote: > > > According to MySQL implementation, if I give the default value of the > column > > during table creation as NULL, it will store the current time in the > > timestamp column. I do not want this "current time" to be stored in the > > timestamp column. I want it to be NULL. How to do this ? > > If you don't like the properties of TIMESTAMP columns, don't use them. > Use DATETIME instead, or use an INT and store Unix time in it (thus > avoiding some complications of time zones and daylight saving time). > > -- > Keith C. Ivey <[EMAIL PROTECTED]> > Tobacco Documents Online > http://tobaccodocuments.org > Phone 202-667-6653 > > --------------------------------------------------------------------- > Before posting, please check: > http://www.mysql.com/manual.php (the manual) > http://lists.mysql.com/ (the list archive) > > To request this thread, e-mail <[EMAIL PROTECTED]> > To unsubscribe, e-mail > <[EMAIL PROTECTED]> > Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php ********************************************************************** This email and any files transmitted with it are confidential and intended solely for the individual or entity to whom they are addressed. If you have received this email in error destroy it immediately. ********************************************************************** Wal-Mart Stores, Inc. Confidential ********************************************************************** --------------------------------------------------------------------- Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail <[EMAIL PROTECTED]> To unsubscribe, e-mail <[EMAIL PROTECTED]> Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php