[EMAIL PROTECTED] (Tkil) wrote in
[EMAIL PROTECTED]:">news:[EMAIL PROTECTED]:
>
>| my $two_weeks_ago_iso = strftime '%Y-%m-%d %T', localtime
>| $two_weeks_ago;
>
> Sigh. After the appropriate "use POSIX qw( strftime );" of course.
>
> t.
>
And make sure that your timezones match :-)
My preference is to use INTERVAL or whatever the
available DB specific functionality is.
By telling the app the type of database I can leave
the app code to use the appropriate SQL construct.
Some apps I work with operate in GMT (no DST)
however the front ends have to operate and present
date in multiple time zones - this can be fun to get
right sometimes.
If the OP is using windows be carefull of trying to set TZ
- there may be a still existent 'feature' in windows that
caches the value of $ENV{TZ} so that changes have no effect.
This does not normally affect non persistent processes
such as CGi scripts but can be a real FITB when running
mod_perl.
Jacqui