The data you have displayed is accurate.
According to the ECMAScript specifications, date-only values in the YYYY-MM-DD
format are considered UTC by default. This information can be found in the technical specification:
... When there is no UTC offset representation, date-only forms are interpreted as UTC time, while date-time forms are interpreted as local time.
Subsequently, the toString
function converts the value into a string representation of local time, factoring in the system's time zone settings.
Detailed IANA time zone data for India, along with descriptive comments, can be accessed from here. The current data (based on tzdata version 2021a) is as follows:
# Zone NAME STDOFF RULES FORMAT [UNTIL]
Zone Asia/Kolkata 5:53:28 - LMT 1854 Jun 28 # Kolkata
5:53:20 - HMT 1870 # Howrah Mean Time?
5:21:10 - MMT 1906 Jan 1 # Madras local time
5:30 - IST 1941 Oct
5:30 1:00 +0630 1942 May 15
5:30 - IST 1942 Sep
5:30 1:00 +0630 1945 Oct 15
5:30 - IST
In your example, you can observe two earlier offsets mentioned in the second and third lines of data. By selecting an even older date (prior to 1854-06-28), you will encounter the offset indicated in the first line. It is also evident that India utilized a +06:30 offset during distinct historical periods.
You can refer to a more user-friendly presentation of all historical data at timeanddate.com here.
This explanation highlights the dynamic nature of time zones. They do not adhere to a fixed numerical offset; instead, the offset varies based on the specific point in time within a time zone, subject to changes directed by the governing authority overseeing that region. For further insights, consult the section titled "Time Zone != Offset" within the timezone tag wiki.