---
title: "f:convertDateTime转换日期的时间问题"
author: "iamlibo"
date: "2007-09-02T13:20:00Z"
tags: []
slug: "f-convertdatetime"
draft: false
lastmod: "2007-09-02T13:20:00Z"
id: 274402
url: "https://iamlibo.iteye.com/blog/274402"
---

使用f:convertDateTime转换日期时,会出现时间的问题,显示出来的日期与实际日期相差8个小时,要加入timeZone="GMT+8"才可以正确的显示

&lt;f:convertDateTime dateStyle="full" type="both" timeZone="GMT+8" locale="cn"/&gt;

这样就可以正确的显示中文日期了.

Technorati : [jsf](http://technorati.com/tag/jsf)