#46 Site-wide date formats and TIMEZONES!


This is a rather large patch containing what I did on
RFE ID #513262 (Consistent Date/Time Formatting).

New functions psl_dateLong, psl_dateShort,
psl_dateTime, etc., which convert timestamps to
formatted strings uniformly. All dates and times (that
I could find) are generated by these functions. The
format strings is localized in the files

Also, there are classes giving several implementations
of time zones. Using a global $_TZ array, there are
global functions tz_strftime, etc., which adjust for
the current time zone.

There are two scripts and the templates to generate
their html:

tz_bench.php: Test implementations of time zone
classes for accuracy and speed (I'm not recommending
that this be added to CVS; it's just a nice demo :-)

tz_select.php: generate and process a form to select
the user's favorite time zone.


  • Matthew Leingang

    Patch file for the described

  • Matthew Leingang

    Logged In: YES

    Well, I did post the patch of existing files, but I did not
    include the new files. Here they are.

    Thanks to Lars for pointing this out!

  • Matthew Leingang

    New files and a patch for existing files

  • Joe Stewart

    Joe Stewart - 2002-09-03

    Logged In: YES

    This patch has been applied to the CVS. Please update your
    copy of PHPSlash, or wait for the next release.

  • Joe Stewart

    Joe Stewart - 2002-09-03
    • status: open --> closed-accepted

Log in to post a comment.