On Jul 12, 2006, at 6:11 PM, Cory R. King wrote:
> Greetings,
>
> I'm in the process of providing a way for visitors of my websites
> to set
> their timezone and locale.
personally, i do this:
db has everything set to GMT
dates are rendered like:
my $display= Package::Functions::Dates::localize( $timestamp ,
$ctx );
sub localize {
my ( $timestamp, $ctx )= @;
my $display;
==
== personalize $display depnding on vars in ctx,
otherwise show as-is
==
return $display;
}
i do that when rendering a page, as i do a lot of object caching ,
and formatting a date out of the DB means I essentially 'corrupt' the
date (its more complex to store something that has been altered )
also to add when using pg:
90% my postgres fields are "TIMESTAMP WITHOUT TIME ZONE", as pg
timestamps are tied to a transaction and can be used as transaction
groupers
10% of my fields are "TIMESTAMP(0) WITHOUT TIME ZONE" , which cuts
the microseconds. i use that for 'display only' fields, but not for
'logging' fields -- if that makes sense
| - - - - - - - - - - - - - - - - - - - -
| RoadSound.com / Indie-Rock.net
| Collaborative Online Management And Syndication Tools
| - - - - - - - - - - - - - - - - - - - -
-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
Rose-db-object mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/rose-db-object