Esempio n. 1
0
 @Override
 public DumpData toDumpData(PageContext pageContext, int maxlevel, DumpProperties dp) {
   String str = castToString(pageContext.getTimeZone());
   DumpTable table = new DumpTable("date", "#ff6600", "#ffcc99", "#000000");
   if (dp.getMetainfo())
     table.appendRow(
         1, new SimpleDumpData("Date Time (" + pageContext.getTimeZone().getID() + ")"));
   else table.appendRow(1, new SimpleDumpData("Date Time"));
   table.appendRow(0, new SimpleDumpData(str));
   return table;
 }
Esempio n. 2
0
 @Override
 public Object invoke(PageContext pc, Object[] args) throws PageException {
   if (args.length == 1) return call(pc, Caster.toDatetime(args[0], pc.getTimeZone()));
   return call(pc, Caster.toDatetime(args[0], pc.getTimeZone()), Caster.toString(args[1]));
 }
Esempio n. 3
0
 public static double call(PageContext pc, DateTime date, String strTimezone)
     throws ExpressionException {
   return _call(
       pc, date, strTimezone == null ? pc.getTimeZone() : TimeZoneUtil.toTimeZone(strTimezone));
 }
Esempio n. 4
0
 public static double call(PageContext pc, DateTime date) {
   return _call(pc, date, pc.getTimeZone());
 }