Closed (duplicate)
Project:
Drupal core
Version:
6.x-dev
Component:
base system
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Issue tags:
Reporter:
Created:
30 Nov 2009 at 18:24 UTC
Updated:
4 Sep 2010 at 13:28 UTC
Jump to comment: Most recent file
Comments
Comment #1
jbrauer commentedHelps if the file's attached...
Comment #2
David_Rothstein commentedI confirmed this (Drupal 6 only) but the patch doesn't seem to work correctly. It prints "7:40pm EST" for me even though it is 2:40pm EST right now.
Is this even possible to fix in Drupal 6, given the way core's timezone handling is done? I think it might be necessary to use Date module here (for example, http://drupalcontrib.org/api/function/date_format_date/6)....?
Comment #3
chrisdfeld commentedI had the same problem with format_date() and the workaround was to use the Date module's date_format_date() (as suggested in #2 above).
Here's the equivalent code for the example above.
The resulting output will use the current user's timezone setting or the Drupal timezone setting as a fallback. Set the second parameter to date_make_date() to force a specific timezone.
Comment #4
dstolHere's a new patch with support for e and P as well. I couldn't replicate problems described in #2.
Comment #5
adamdicarlo commentedI think this needs more work:
1. Can't add support for 'e' -- see #494434 comment #2.
2. Need to update the function's header comment to document support for 'c' and 'P' -- you can adapt my patch from #494434 or improve its wording.
Comment #6
dstolMarking as duplicate of #494434: format_date() does not support "c", "e", "P", "T" specifiers, displays GMT for all
See http://drupal.org/node/494434#comment-3409190