[thelist] web and db server local time

Luther, Ron Ron.Luther at hp.com
Fri Nov 16 15:38:00 CST 2007


Joel D Canfield asked:

>>shouldn't the web server be aware of my local time via the browser?


Hi Joel,


Not automagically.  And in a hand-rolled app, this is onna them things you hafta hand-roll.  ;-)

For a bloggy thing, one idea might be to lose the timestamp, just use date, and enter that as a field with your commentary.

Another idea might be to store everything in PST and add a "Dateline Left Coast" beneath the title in your display markup.

Thoidly, you might consider saving everything in the db in 'standard' Greenwich (or Wickedwich) time.  So if you move the server to another host in another time zone ... or start entering blog entries during your daily commutes between the Emerald Isle and Timbuktu or grow so big you need a distributed server farm large enough to shame inktomi ... you'll be able to figger out when is when ... if not where is where!


For more ideas, please insert another nickel!

HTH,
RonL.

When I had a site hosted in Australia (the currency conversion rate at the time made it toooo cheap to pass up) I left the display at server-time and put some kind of cheesey "in Sydney, Australia" next to the display. <shrug />



More information about the thelist mailing list