Re: putting the current date in a mysql db
by "rudy" <r937(at)interlog.com>
|
Date: |
Sat, 17 Aug 2002 01:00:36 -0400 |
To: |
<hwg-techniques(at)mail.hwg.org> |
|
todo: View
Thread,
Original
|
|
tough choice about the server time zone
if the server is accurate and reliable, then just figure out its offset
from you, and change your INSERT statement to use
dateadd(now(), interval 11 hour)
or whatever the offset is
on the other hand, if you use a form field like a text box or something,
with a date/time populated by javascript, then not only will it be "your"
time, but you also have the opportunity to change it before submitting
this would allow you to post entries in advance, get them up there and
check them out before the live date rolls around, but only you can judge if
this feature has value
i would put the 11 or whatever the offset is into a site-wide variable, so
i can adjust it for daylight savings time
rudy
http://rudy.ca/
HWG hwg-techniques mailing list archives,
maintained by Webmasters @ IWA