当网页用户点击该页面上的“ 提交”按钮时,我需要将当前时间戳作为隐藏输入类型发送到另一个页面。 我能够使用JSP Date()函数执行此操作,但它存储了本地计算机时间,因为我在localhost上使用AEM。
但是我想只在EST中发送当前时间戳,当表单在AEM服务器上而不是在localhost上托管时,这对于从任何地理位置点击提交按钮的所有用户都是通用的。
以下是存储本地时间的代码:
<% Date date = new Date(); %>
<input name="timeStamp" value="<%=date.toString()%>" type="hidden" />
PS我将AEM表格中的数据带到Eloqua,因此我想知道用户何时填写表格(在什么时间和日期)?
谢谢。
I need to send current time stamp as a hidden input type to another page when the user of the webpage hits Submit button on that page. I'm able to do so with JSP Date() function but it is storing my local machine time because I'm using AEM on localhost.
However I want to send current time stamp in only EST which will be universal to all users hitting the submit button from any geographical location when the form is hosted on AEM server and not on localhost.
Below is the code which is storing local time:
<% Date date = new Date(); %>
<input name="timeStamp" value="<%=date.toString()%>" type="hidden" />
P.S. I'm taking the data from AEM form to Eloqua and for that reason I want to know when did the user filled the form (at what time and date)?
Thanks.
请发表评论