[Catalyst] now() in insert

Felix Antonius Wilhelm Ostmann ostmann at websuche.de
Fri Feb 6 17:19:25 GMT 2009


And DateTime->now give you the time from the server where your script is 
running and SQL now() gives you the time from the database-server!

Lars Balker Rasmussen schrieb:
> 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 => \'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=> 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/
>
>
>   


-- 
Mit freundlichen Grüßen

Felix Antonius Wilhelm Ostmann
--------------------------------------------------
Websuche   Search   Technology   GmbH   &   Co. KG
Martinistraße 3  -  D-49080  Osnabrück  -  Germany
Tel.:   +49 541 40666-0 - Fax:    +49 541 40666-22
Email: info at websuche.de - Website: www.websuche.de
--------------------------------------------------
AG Osnabrück - HRA 200252 - Ust-Ident: DE814737310
Komplementärin:     Websuche   Search   Technology
Verwaltungs GmbH   -  AG Osnabrück  -   HRB 200359
Geschäftsführer:  Diplom Kaufmann Martin Steinkamp
--------------------------------------------------




More information about the Catalyst mailing list