MMBase

mm:time does not work well with Date objects

Details

  • Type: Bug Bug
  • Status: Resolved Resolved
  • Priority: Major Major
  • Resolution: Fixed
  • Affects Version/s: 1.7.0
  • Fix Version/s: Irrelevant
  • Component/s: Taglib
  • Description:
    Hide
    original bugid: #6468
    I am trying to write a time created by a mm:time tag to a context this fails

    --SAMPLE--
    <%@page language="java"%>
    <%@taglib uri="http://www.mmbase.org/mmbase-taglib-1.0" prefix="mm" %>
    <mm:import id="timeformat">dd-MM-yyyy</mm:import>
    <mm:import externid="time" jspvar="Date"><mm:time time="now" format="\$$timeformat" precision="days"/></mm:import>

    <hr/>
    Date test 0:
    <mm:time referid="time" offset="86400" format="\$$timeformat" inputformat="\$$timeformat">
      <a href="<mm:url referids="_@time"/>">one day later(<mm:write/>)</a>
    </mm:time>
    <hr/>
    Date test 1:
    <mm:time referid="time" offset="86400" format="\$$timeformat" inputformat="\$$timeformat" jspvar="test" vartype="Date">
      <a href="<mm:url referids="_@time"/>">one day later(<mm:write/>)</a>
    </mm:time>
    <hr/>


    --result
     Date test 0: one day later(14-05-2004)
     Date test 1: one day later(Thu Jan 01 00:59:59 CET 1970)
    Show
    original bugid: #6468 I am trying to write a time created by a mm:time tag to a context this fails --SAMPLE-- <%@page language="java"%> <%@taglib uri="http://www.mmbase.org/mmbase-taglib-1.0" prefix="mm" %> <mm:import id="timeformat">dd-MM-yyyy</mm:import> <mm:import externid="time" jspvar="Date"><mm:time time="now" format="\$$timeformat" precision="days"/></mm:import> <hr/> Date test 0: <mm:time referid="time" offset="86400" format="\$$timeformat" inputformat="\$$timeformat">   <a href="<mm:url referids="_@time"/>">one day later(<mm:write/>)</a> </mm:time> <hr/> Date test 1: <mm:time referid="time" offset="86400" format="\$$timeformat" inputformat="\$$timeformat" jspvar="test" vartype="Date">   <a href="<mm:url referids="_@time"/>">one day later(<mm:write/>)</a> </mm:time> <hr/> --result  Date test 0: one day later(14-05-2004)  Date test 1: one day later(Thu Jan 01 00:59:59 CET 1970)

Activity

Hide
Kees Jongenburger added a comment - 2004-05-13 17:17
mm:time does not work well with Date objects
I am trying to write a time created by a mm:time tag to a context this fails

--SAMPE--
<%@page language="java"%>
<%@taglib uri="http://www.mmbase.org/mmbase-taglib-1.0" prefix="mm" %>
<mm:import id="timeformat">dd-MM-yyyy</mm:import>
<mm:import externid="time" jspvar="Date"><mm:time time="now" format="\$$timeformat" precision="days"/></mm:import>

<hr/>
Date test 0:
<mm:time referid="time" offset="86400" format="\$$timeformat" inputformat="\$$timeformat">
  <a href="<mm:url referids="_@time"/>">one day later(<mm:write/>)</a>
</mm:time>
<hr/>
Date test 1:
<mm:time referid="time" offset="86400" format="\$$timeformat" inputformat="\$$timeformat" jspvar="test" vartype="Date">
  <a href="<mm:url referids="_@time"/>">one day later(<mm:write/>)</a>
</mm:time>
<hr/>


--result
 Date test 0: one day later(14-05-2004)
 Date test 1: one day later(Thu Jan 01 00:59:59 CET 1970)
Show
Kees Jongenburger added a comment - 2004-05-13 17:17 mm:time does not work well with Date objects I am trying to write a time created by a mm:time tag to a context this fails --SAMPE-- <%@page language="java"%> <%@taglib uri="http://www.mmbase.org/mmbase-taglib-1.0" prefix="mm" %> <mm:import id="timeformat">dd-MM-yyyy</mm:import> <mm:import externid="time" jspvar="Date"><mm:time time="now" format="\$$timeformat" precision="days"/></mm:import> <hr/> Date test 0: <mm:time referid="time" offset="86400" format="\$$timeformat" inputformat="\$$timeformat">   <a href="<mm:url referids="_@time"/>">one day later(<mm:write/>)</a> </mm:time> <hr/> Date test 1: <mm:time referid="time" offset="86400" format="\$$timeformat" inputformat="\$$timeformat" jspvar="test" vartype="Date">   <a href="<mm:url referids="_@time"/>">one day later(<mm:write/>)</a> </mm:time> <hr/> --result  Date test 0: one day later(14-05-2004)  Date test 1: one day later(Thu Jan 01 00:59:59 CET 1970)
Hide
Michiel Meeuwissen added a comment - 2004-05-18 17:39
mm:time does not work well with Date objects
I am trying to write a time created by a mm:time tag to a context this fails

--SAMPE--
<%@page language="java"%>
<%@taglib uri="http://www.mmbase.org/mmbase-taglib-1.0" prefix="mm" %>
<mm:import id="timeformat">dd-MM-yyyy</mm:import>
<mm:import externid="time" jspvar="Date"><mm:time time="now" format="\$$timeformat" precision="days"/></mm:import>

<hr/>
Date test 0:
<mm:time referid="time" offset="86400" format="\$$timeformat" inputformat="\$$timeformat">
  <a href="<mm:url referids="_@time"/>">one day later(<mm:write/>)</a>
</mm:time>
<hr/>
Date test 1:
<mm:time referid="time" offset="86400" format="\$$timeformat" inputformat="\$$timeformat" jspvar="test" vartype="Date">
  <a href="<mm:url referids="_@time"/>">one day later(<mm:write/>)</a>
</mm:time>
<hr/>


--result
 Date test 0: one day later(14-05-2004)
 Date test 1: one day later(Thu Jan 01 00:59:59 CET 1970)
Show
Michiel Meeuwissen added a comment - 2004-05-18 17:39 mm:time does not work well with Date objects I am trying to write a time created by a mm:time tag to a context this fails --SAMPE-- <%@page language="java"%> <%@taglib uri="http://www.mmbase.org/mmbase-taglib-1.0" prefix="mm" %> <mm:import id="timeformat">dd-MM-yyyy</mm:import> <mm:import externid="time" jspvar="Date"><mm:time time="now" format="\$$timeformat" precision="days"/></mm:import> <hr/> Date test 0: <mm:time referid="time" offset="86400" format="\$$timeformat" inputformat="\$$timeformat">   <a href="<mm:url referids="_@time"/>">one day later(<mm:write/>)</a> </mm:time> <hr/> Date test 1: <mm:time referid="time" offset="86400" format="\$$timeformat" inputformat="\$$timeformat" jspvar="test" vartype="Date">   <a href="<mm:url referids="_@time"/>">one day later(<mm:write/>)</a> </mm:time> <hr/> --result  Date test 0: one day later(14-05-2004)  Date test 1: one day later(Thu Jan 01 00:59:59 CET 1970)

People

Dates

  • Created:
    2004-05-24 16:19
    Updated:
    2009-07-31 16:17
    Resolved:
    2009-07-31 16:17