Newer Version Available
Converting Time Zones in Date Functions
SOQL queries in a client application return dateTime field
values as Coordinated Universal Time (UTC) values. You can use convertTimezone() in a date function to convert
dateTime fields to
the user’s time zone.
For example, you could use the convertTimezone(dateTimeField) function to find the sum of the Amount values for all your opportunities for each hour of the day, where the hour is converted to the user's time zone.
Note that you can only use convertTimezone() in a date function. The following query doesn't work because there is no date function.