View on
MetaCPAN is shutting down
For details read Perl NOC. After June 25th this page will redirect to
Jesse Vincent > Jifty > Jifty::DateTime



Annotate this POD


New  13
Open  3
Stalled  1
View/Report Bugs
Source   Latest Release: Jifty-1.50430


Jifty::DateTime - a DateTime subclass that knows about Jifty users


Jifty natively stores timestamps in the database in GMT. Dates are stored without timezone. This class loads and parses dates and sets them into the proper timezone.

new ARGS

See "new" in DateTime. After calling that method, set this object's timezone to the current user's time zone, if the current user has a method called time_zone.


Return timezone if the current user has it

new_from_string STRING

Take some user defined string like "tomorrow" and turn it into a Jifty::Datetime object. If the string appears to be a _date_, keep it in the floating timezone, otherwise, set it to the current user's timezone.


Returns the date given by this Jifty::DateTime object. It will display "today" for today, "tomorrow" for tomorrow, or "yesterday" for yesterday. Any other date will be displayed in ymd format.

syntax highlighting: