Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Line 201 of file author_pane.module is as follows:
$just_date = str_replace(array('H:i', 'g:ia', ' - '), '', variable_get('date_format_short', 'm/d/Y - H:i'));
This assumes a great deal about the date/time format, since we can specify our own formats in the drupal interface which can include among other things, punctuation (eg , : - / @) and also seconds and timezone identifier.
I found that this produced strange looking dates using my default short date format (j M Y, H:i:s T).
You should use a more generic method of extracting the date part from the time, and not rely upon a particular format string, or simply use the entire date and time as given.
Comments
Comment #1
MichelleIf you have a suggestion for a more generic method, patches / code snippits are welcome.
Michelle
Comment #2
Scyther CreditAttribution: Scyther commentedAdded tag
Comment #3
Scyther CreditAttribution: Scyther commentedhttp://drupalcode.org/project/author_pane.git/commit/dd284ca
Commited a update that adds a choise, to select which Date type to use to display the join date, for block and content pane.
Comment #4
MichelleIs the non-date related stuff in there intentional? Not quibbling about the specificity of the commit, just making sure it wasn't accidental. :)
Michelle
Comment #5
Scyther CreditAttribution: Scyther commentedYes it was intentionally. Needed to add the select option to the block and content pane so you could select which date type to format the join date on.
Comment #6
MichelleWell, I meant the other stuff... But, looking closer, I guess most of it is just changing comments around and such and not any actual functionality change.
Michelle