0

In book it is said that datetime-local attribute specifies a date and time input field, with no time zone.

But there is no clear reference to what datetime is about. I assume it specifies a date and time input field, with time zone.

I am using Linux. As such I am unable to test my code on Internet Explorer and Safari.

datetime-local seems to be supported only on Chrome and Opera but not on Firefox.

And datetime seems to be not suppoerted on any of the above mentioned browsers.

user10271516
  • 25
  • 1
  • 6

1 Answers1

0

datetime used to be supported by most browsers, but it was deprecated and removed in favour of datetime-local.

This is because datetime caused confusion - what timezone are we selecting a date and a time for? The timezone where the server is situated? The timezone where the user is situated? I believe some allowed you to pick a timezone at some point?

Anyway, It didn't make semantic sense, and caused a bit of confusion, so datetime-local was introduced to deal with this - the timezone will always be set to that of the user's location.

You can read more about this here.

Toastrackenigma
  • 7,604
  • 4
  • 45
  • 55