From: David Vallner Date: 2006-10-16T12:04:34+09:00 Subject: Re: [OT] Ruby DateTime and MySQL datetime --------------enigCCEE99532A0018F423BE2828 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Roseanne Zhang wrote: > Yes, I used MySQL timestamp, which is better since it initialize itself= =20 > if you don't. >=20 Which is an idiosyncracy of MySQL I resent, but that's sidetracking. Also, it's only convenient to store server-side times, and because of the automagical behaviour, at best record creation / update times. (Hands up who remembers to set the MySQL connection timezone depending on the HTTP request client locale?) User-input times will need massaging to convert them from his local timezone to a canonical representation anyway, often can be optional, when relying on MySQL specifics will shoot yourself in the foot as it's completely impossible for the first timestamp column to contain a SQL null ever, and a UNIX epoch timestamp is the a representation I'd prefer on accounts of being widely supported, compact, and trivial and efficient to do comparison and computation with, followed by an ISO textual notation on accounts of being as standard as they get. David Vallner --------------enigCCEE99532A0018F423BE2828 Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.5 (MingW32) iD8DBQFFMva+y6MhrS8astoRAqztAJ98cr8UnhiS75ozxPm1qwU8CtBIRwCfaVWw 8RUCrB9IMtkgR/6vJHN8d+o= =IARa -----END PGP SIGNATURE----- --------------enigCCEE99532A0018F423BE2828--