I am using the token %date to put the date and time into the confirmation email which is returned to the user. However if I submit at say 10.30am (GMT, winter) it displays as 11.30am. If I look at the listing of submissions when reported from the database it shows the same problem.

It looks like a timezone/summer time problem, but it's not summer at present.

(In fact I don't really want the time, the date would be sufficient. Is there a way to display the date without the time in the email?)

Regards, Tony.

Comments

quicksketch’s picture

Category: bug » support

This is the line of code that forms the %date token:

    $replacements['safe']['%date'] = format_date(time(), 'large');

time() is always in GMT (no timezone support). The format_date() function will adjust the time according to whatever settings you have configured at admin/settings/date-time. That will affect the time site-wide (all of which is probably an hour off).

Anonymous’s picture

You are right, it is more general than Webform, but is inconsistent across the site. Also, this is a test copy of my main site, which is working correctly. All very odd.

Regards, Tony.

quicksketch’s picture

Status: Active » Closed (fixed)

Closing after lack of activity. I'm not sure there is anything to be done on the Webform side here.