The example text below the date popup and time input fields does not respect the configured time zone. Instead it uses the server OSes time zone. E.g. the server OS is set to Europe/Berlin(DST: +0200), the Drupal time zone is set to "Europe/Moscow" (DST: +0400) and the users time zone ist set to UTC. At 5:00 UTC one would expect, that the expample text below the time input field would be 05:00:00, but instead its 07:00:00 which is the servers OS time zone.

Attached is a patch that fixes the problem.

Test environment:
- PHP :5.2.6-1
- Server OS: Linux webtest 2.6.26-2-686 #1 SMP Thu Mar 26 01:08:11 UTC 2009 i686
- httpd: Apache/2.2.9 (Debian) PHP/5.2.6-1+lenny2 with Suhosin-Patch mod_python/3.3.1 Python/2.5.2 mod_perl/2.0.4 Perl/v5.10.0

Comments

eric-alexander schaefer’s picture

Status: Active » Needs review
eric-alexander schaefer’s picture

Title: Date/Time expample text does not respect the time zone » Date/Time example text does not respect the time zone
vitali04’s picture

StatusFileSize
new2.28 KB

Also value don't respect the time zone.
patch is attached.

I think we need to replace all date() and date_format() functions to date_format_date() for true TZ and locale

thanks

Attach is bit patch

eric-alexander schaefer’s picture

Didn't notice that because I always override the default value.

BTW: vitali04s patch contains my proposed change, so his patch should be applied.

ntcrportec’s picture

This issue solved a problem i explain on the forum : http://drupal.org/node/608426 .
My problem was not just on example text, but in the pop-up himself, creating a trouble when i went to save a node.
With the replace of all date() and date_format() functions to date_format_date() in date_popup.module, all work fine now.

Thank you,

jennycita’s picture

+1

Patch in Comment #3 did the trick for me.

kelu95310’s picture

Version: 6.x-2.x-dev » 6.x-2.4
Status: Needs review » Patch (to be ported)

Patch in Comment #3 did the trick for me too.

thx

seren10pity’s picture

Worked perfectly for me too, thanks!

eric-alexander schaefer’s picture

Status: Patch (to be ported) » Reviewed & tested by the community
karens’s picture

Status: Reviewed & tested by the community » Fixed

These changes are already in dev. There must have been a duplicate issue/patch.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.