PM time converted and shown as AM
PM time converted and shown as AM
a2ztech
Posts: 19Questions: 2Answers: 1
e.g. 17:00:00 in the DB shows up as 5:00 AM on the editor grid.
further while editing the PM time gets save as AM.
Is this something to do with windows/regional settings?
The online example https://editor.datatables.net/examples/dates/time.html
works right. But, the one downloaded on my machine does NOT?
This discussion has been closed.
Replies
Hi,
Are you able to give me a link to your page? It is possible there is a timezone issue, but I would have expected it to be present in my examples as well if you were seeing it locally.
Allan
I am running .NET examples downloaded from this website as it is on my local.
https://editor.datatables.net/examples/dates/time.html
It works fine on the link above but NOT on my local.
Can you guide me if there are any settings which I need to change here? This is critical for me to deliver this solution to my client. Thanks!
Running the .NET version makes a difference here, and I'm afraid you've discovered a bug in my .NET demo! In the
TimeController.cs
there is:it should be:
Note the difference in the
HH
rather thanhh
.hh
is 12 hour, whileHH
is 24 hour, which is needed for the SQL database.Making that change allows it to correctly save the time.
Thanks for letting me know about this.
Regards,
Allan
ohhh..k..that was painful..
Thanks though