Work at SourceForge, help us to make it a better place! We have an immediate need for a Support Technician in our San Francisco or Denver office.

Close

#46 Site-wide date formats and TIMEZONES!

closed-accepted
nobody
None
5
2002-09-03
2002-07-12
Matthew Leingang
No

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
locale/<locale>.LC_TIME.php.

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.

Discussion

  • Patch file for the described

     
    Attachments
  • Logged In: YES
    user_id=511593

    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!

     
  • New files and a patch for existing files

     
    Attachments
  • Joe Stewart
    Joe Stewart
    2002-09-03

    Logged In: YES
    user_id=77269

    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