Wednesday, May 6, 2015

I still wonder how come that after so many years of HTML existence there is no easy way to output date/time values in local time. What could be as simple as having an element like <localdatetime value="2015-05-06 10:39:00" format="hh:mm"/> to make sure that user sees the time in the local timezone? (the value as you may have already guessed comes as UTC date/time and the format allows to control which parts of date/time have to appear in the result)
The problem is that even in the simplest case of a static page that, for example, now and then has to display a maintenance warning like "due to maintenance works the site will be unavailable till 10:00 of local time" the developer must use javascript or something else to render the time correctly. That's quite annoying.

No comments:

Post a Comment