Why is the datetime format in HTML5 different from the datetime format in MySQL?
-
When you use a datetime input type in HTML5 the string posted to the server has the format YYYY-MM-DDTHH:MM (Eg. 2011-01-09T18:30). In MySQL it is YYYY-MM-DD 18:30:26 (Eg. 2011-01-09 18:30:26). Vitally the MySQL version includes seconds and doesn't include the random T in the middle. Why? Does HTML5 not like spaces? Is it fond of imprecise times?
-
Answer:
There is a very simple explanation to your question. 2011-01-09T18:30 is Coordinated Universal Time value. You have probably seen it referred to as UTC (Universal Time Coordinate). Greenwich Mean Time is the same as a UTC. If you want to know more you should read ISO 8601 http://uk.ask.com/wiki/ISO_8601 http://uk.ask.com/wiki/Universal_Time
Matthew Wittering at Quora Visit the source
Related Q & A:
- Why are there different types of neurotransmitters?Best solution by Quora
- Why Can't I find my databases from Mysql on linux?Best solution by Database Administrators
- Why the same font in Java looks different?Best solution by Stack Overflow
- Why doesn't MySQL upload my data properly?Best solution by php-mysql-tutorial.com
- Why do different people like different flavors?Best solution by Yahoo! Answers
Just Added Q & A:
- How many active mobile subscribers are there in China?Best solution by Quora
- How to find the right vacation?Best solution by bookit.com
- How To Make Your Own Primer?Best solution by thekrazycouponlady.com
- How do you get the domain & range?Best solution by ChaCha
- How do you open pop up blockers?Best solution by Yahoo! Answers
For every problem there is a solution! Proved by Solucija.
-
Got an issue and looking for advice?
-
Ask Solucija to search every corner of the Web for help.
-
Get workable solutions and helpful tips in a moment.
Just ask Solucija about an issue you face and immediately get a list of ready solutions, answers and tips from other Internet users. We always provide the most suitable and complete answer to your question at the top, along with a few good alternatives below.