GSP
Quick Navigator

Search Site

Unix VPS
A - Starter
B - Basic
C - Preferred
D - Commercial
MPS - Dedicated
Previous VPSs
* Sign Up! *

Support
Contact Us
Online Help
Handbooks
Domain Status
Man Pages

FAQ
Virtual Servers
Pricing
Billing
Technical

Network
Facilities
Connectivity
Topology Map

Miscellaneous
Server Agreement
Year 2038
Credits
 

USA Flag

 

 

Man Pages
Jifty::DBI::Filter::DateTime(3) User Contributed Perl Documentation Jifty::DBI::Filter::DateTime(3)

Jifty::DBI::Filter::DateTime - DateTime object wrapper around date columns

This filter allow you to work with DateTime objects instead of plain text dates. If the column type is "date", then the hour, minute, and second information is discarded when encoding.

Both input and output will always be coerced into UTC (or, in the case of Dates, the Floating timezone) for consistency.

This is an instance of the DateTime::Format object used for inflating the string in the database to a DateTime object. By default it is a DateTime::Format::Strptime object that uses the "_strptime" method as its pattern.

You can use the _formatter classdata storage as a cache so you don't need to re-instantiate your format object every "decode".

If value is DateTime object then converts it into ISO format "YYYY-MM-DD hh:mm:ss". Does nothing if value is not defined.

Sets the value to undef if the value is a string and doesn't match an ISO date (at least).

If value is defined then converts it into DateTime object otherwise do nothing.

Jifty::DBI::Filter, DateTime
2014-05-29 perl v5.32.1

Search for    or go to Top of page |  Section 3 |  Main Index

Powered by GSP Visit the GSP FreeBSD Man Page Interface.
Output converted with ManDoc.