[Catalyst] now() in insert

Devin Austin devin.austin at gmail.com
Fri Feb 6 17:04:40 GMT 2009


DateTime has ::Formatter classes, I *know* there's a *ahem* MySQL formatter
(DateTime::Format::MySQL i believe), and probably a Pg formatter.

On Fri, Feb 6, 2009 at 9:49 AM, Lars Balker Rasmussen <lars at balker.dk>wrote:

> On Fri, Feb 6, 2009 at 5:40 PM, Devin Austin <devin.austin at gmail.com>
> wrote:
> > On Fri, Feb 6, 2009 at 4:45 AM, Christian Lackas <christian at lackas.net>
> wrote:
> >>                        dt =3D> \'now()'
> >
> > DateTime also has a ->now method.
>
> Careful now, they may not be identical:
>
> % perl -MDateTime -E 'say DateTime->now'
> 2009-02-06T16:47:48
>
> postgresql=3D> select now();
>              now
> -------------------------------
>  2009-02-06 17:48:00.240287+01
>
> No timezone in DateTime unless you explicitly ask for it.
>
> _______________________________________________
> List: Catalyst at lists.scsys.co.uk
> Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst
> Searchable archive:
> http://www.mail-archive.com/catalyst@lists.scsys.co.uk/
> Dev site: http://dev.catalyst.perl.org/
>



-- =

Devin Austin
http://www.dreamhost.com/r.cgi?326568/hosting.html - Host with DreamHost!
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.scsys.co.uk/pipermail/catalyst/attachments/20090206/4832f=
7b7/attachment.htm


More information about the Catalyst mailing list