last modification with time stamp as well as date?

macsamurai

Joined: 2002-12-01
Posts: 16
Posted: Thu, 2002-12-12 00:59

i see the call for getLastModificationDate in albums.php, but since i literally know nothing about php, can anyone tell me how I might add a time stamp to that so it shows, for example, "Last changed on Dec 11, 2002 at 7:59pm ET" ?

Thanks in advance,

Laurie

 
beckett
beckett's picture

Joined: 2002-08-16
Posts: 3473
Posted: Thu, 2002-12-12 01:51

Line 1058 (v1.3.2), Line 974 (v1.3.1) of classes/Album.php:

Change from:
return date("M d, Y", $time);
to
return date("M d, Y at g:ia T", $time);

N.B.: this will also affect the "Changed: ____" text in the description of sub-albums!

-Beckett (

)

 
beckett
beckett's picture

Joined: 2002-08-16
Posts: 3473
Posted: Thu, 2002-12-12 01:52

See the <!-- BBCode Start --><A HREF="http://www.php.net/manual/en/function.date.php" TARGET="_blank">PHP Docs</A><!-- BBCode End --> if you want to create your own string.

 
macsamurai

Joined: 2002-12-01
Posts: 16
Posted: Thu, 2002-12-12 05:23

Thanks, Beckett... that did the trick! Except the at prints as just the letter a - which looked weird, and i couldn't figure out how to make the t print, so i merely removed them both and substituted @, which works fine :smile:

 
beckett
beckett's picture

Joined: 2002-08-16
Posts: 3473
Posted: Thu, 2002-12-12 05:31

Doh! My bad. t is a tab character, so that needs to be doubly escaped.

return date("M d, Y a\t g:ia T", $time);

Cheers,
-Beckett (

)