日期格式化标签<fmt:formatDate>&<fmt:setTimeZone>时区标签的使用demo

<%@ page contentType="text/html" pageEncoding="GBK"%>
<%@ page import="java.util.*"%>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt"%>
<html>
<head><title>国际化标签库</title></head>
<body>
<%
pageContext.setAttribute("date",new Date());
%>
<fmt:setTimeZone value="MET"/>
<fmt:formatDate value="${date}" type="both" dateStyle="full" timeStyle="full" var="dateref"/>
<h3>中欧时间:${dateref}</h3>
</body>
</html>

运行结果:

中欧时间:2013年8月26日 星期一 上午10时59分36秒 MEST

日期格式化标签<fmt:formatDate>&<fmt:setTimeZone>时区标签的使用demo的更多相关文章

  1. JSP标签 <fmt:formatDate>格式化日期

    <fmt:formatDate>标签用于使用不同的方式格式化日期. <%@ page language="java" contentType="text ...

  2. jstl标签的fmt:formatDate格式化日期 String to Date

    使用fmt函数需在jsp中引入 <%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" ...

  3. <fmt:formatDate> 标签,日期格式化问题(Day_24)

    一个时间显示问题,出生日期显示应为: yyyy-MM-dd,却显示: GMT格式(Wed Jun 15 00:00:00 CST 1983) 解决方案: 将图一改为图二. 图一: 图二: 最后: 注意 ...

  4. JSTL标签库中fmt标签,日期,数字的格式化

    首先介绍日期的格式化:(不要嫌多哦) JSTL格式化日期(本地化) 类似于数字和货币格式化,本地化环境还会影响生成日期和时间的方式. <%@ page pageEncoding="UT ...

  5. jsp日期显示格式化-<fmt:formatDate

    在处理从数据库读取到的日期的时候发现,视图层通过EL表达式获取的日期格式跟预期不符 为格林威治时间(GMT)格式 解决: 1.引入JSTL标签 <%@ taglib prefix="f ...

  6. jsp页面格式化时间 fmt:formatDate格式化日期

    使用fmt函数需在jsp中引入 <%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" ...

  7. jstl <fmt:formatDate>标签

    <fmt:formatDate>标记用于在各种不同的方式来格式化日期 属性: <fmt:formatDate>标签具有以下属性: 属性 描述 必需 默认值 value 要显示的 ...

  8. <fmt:formatDate>标签的输出格式:

    <fmt:formatDate>标签的输出格式:  d   月中的某一天.一位数的日期没有前导零.      dd   月中的某一天.一位数的日期有一个前导零.      ddd   周中 ...

  9. [置顶] fmt日期格式化

    jstl中的日期格式化 <%@ taglib prefix="c" uri="http://java.sun.com/jstl/core" %> & ...

随机推荐

  1. QFrame好像是万能的(可以随意画线,或者图片,放在其它元素之间做点缀,还可OnClick)

    QFrame *fr2=new QFrame(this); fr2->setGeometry(0,140,90,40); fr2->setStyleSheet("backgrou ...

  2. javascript 中 undefined 和 null 区别

    1.相同点 如果我们直接用 undefined == null  比较他们是相等的返回的将是 true. 2.区别 当我们用undefined === null 比较的时候最后返回的将是 false. ...

  3. yii Query Builder (yii 查询构造器) 官方指南翻译

    /**** Query Builder translated by php攻城师 http://blog.csdn.net/phpgcs Preparing Query Builder 准备 Quer ...

  4. crm使用FetchXml聚合查询

    /* 创建者:菜刀居士的博客  * 创建日期:2014年07月08号  */ namespace Net.CRM.FetchXml {     using System;     using Micr ...

  5. 十天学习PHP之第三天

    1)按右边的结构:查看改动表结构  2)按右边的浏览:查看表中的数据  3)按右边的SQL:执行SQL语句  4)按右边的插入:插入一行记录  5)按右边的清空:删除表中全部记录  6)按右边的删除: ...

  6. ASP.NET、WinForm - 判断整个页面文本框是否为空

    foreach(Control ctrl in Page.Controls) { foreach(Control childc in ctrl.Controls) { switch(childc.Ge ...

  7. appium 真机测试问题 出现 instruments crashed on startup

    1.appium 真机测试的时候 instruments crashed on startup,必须在真机上打开UI Automation 在设置里: Developer->Enable UI ...

  8. Custom draw 和 Owner draw 的区别

    "Custom Draw" is a feature shared by all of Microsoft's common controls, which allows you ...

  9. sap的示例代码

    sap的示例代码查看1.在SE38环境下的程序名输入栏输入'DEMO*'后按F4,你可以查到SAP所有的DEMO示例程序,好好看看,你会学到很多ABAP功能的实现方法.2.运行“ABAPDOCU”T- ...

  10. 启动网页时候自己主动载入servlet假设不使用strus最经常使用的两种方式

    这是第一种使用的是onload方法当中的test是自己的servlet <html> <body onload = "test"> </body> ...