为什么我在上午12点到早上8点之间从javascript获得1天的回复日期,当我填写表格时? [英] Why I get 1 day back date from javascript within 12 AM to 8 AM, when I fill the form?

查看:106
本文介绍了为什么我在上午12点到早上8点之间从javascript获得1天的回复日期,当我填写表格时?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我是asp.net的软件开发人员。我们正在开发用于Android手机网站调查的实时应用程序。在那里,当用户填写表单时,他通过javascript自动使用getDate()方法在一个文本框中获得系统时间。但问题是 -

当用户在上午12点到早上8点之间填写表格,然后日期将显示上一个日期,就像我在28/4/17填写表格然后显示27/4/17 。大约有35,000人在使用此应用程序,但问题仅由一个用户发生。



I am software developer in asp.net. We are working on live application which work for site survey by android mobile. In that, when user fill the form, he get system time in one textbox by javascript using getDate() method automatically. But problem is-
when user fill the form between 12 AM to 8 AM, then the date will show previous date, like i fill form on 28/4/17 then it display 27/4/17. Around 35k peoples working on this application, but the problem is occured by only one user.

var d = new Date();
        var curr_date = d.getDate();





我尝试过:



i不知道,在这个复杂的metter中该怎么办?



What I have tried:

i don't get any idea, what to do in this complex metter?

推荐答案

大多数情况下可能是用户系统日期时间没有更新到当前日期时间,如果每次都获得相同的日期时间,则可能是用户机器电池已过期。
Most the case may be the user system date time not updating to current date time and if you getting the same date time every time then it's may be user machine battery expired.


这篇关于为什么我在上午12点到早上8点之间从javascript获得1天的回复日期,当我填写表格时?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆