Problem with date_timezone_set() I've managed to get my webform fields to display in views via this tutorial. The tutorial uses the Webform My SQL views and data modules.

Webmform My SQL views: 7.x -1.0
Data: 7.x-1.0 alpha

System:
Plesk 10.3
CentOS 5.8
Apache 2.2.3
Php 5.1.6

I can successfully create my view that allows me to choose the webform fields I want to display, however, when i try to add the "Webform views request time off 272: Submitted" date field, I get this:


  Warning: date_timezone_set() expects parameter 1 to be DateTime, boolean given in format_date() (line 1909 of /var/www/vhosts/mydomain.com/intranet/includes/common.inc).





  Warning: date_format() expects parameter 1 to be DateTime, boolean given in format_date() (line 1919 of /var/www/vhosts/mydomain.com/intranet/includes/common.inc).


As a result, this field displays no values.

I've done a search on that issue and while I did find some topics, I'm not sure how they apply to my situation. Unfortunately, this site is for our intranet so I cannot post a link.

The goal in this view is to show the submission fields and include a filter control that I can expose to the user that uses the submission date as the criteria for a date range.

I had the "Date" module activated, then deactivated which didn't resolve the issue.

Any help would be greatly appreciated.
I ran into the very same 2 errors but in the context of of sub-theme preprocess function when using the format_date() function as follows.

$vars['timestamp'] = format_date($dc_file_items[0]['timestamp'], 'custom', 'd M, Y');


After searching in many directions (including installing the Date module - not required), I came to realize that $dc_file_items[0]['timestamp'] was returning a string and not an integer. Adding intval() around it made the errors disappear. In the end, the code above should look like this.

$vars['timestamp'] = format_date(intval($dc_file_items[0]['timestamp']), 'custom', 'd M, Y');


Hope this helps.