While most countries to some degree conform to the twenty-four time zones roughly delineated by the earth’s lines of longitude, each zone being offset by an hour, certain countries, like Sri Lanka, offset their own standard time by an unusual increment, such as a half hour.
Time zones are a relatively recent creation in human history. Originally, most cities or counties had their own standard time as set by their observation of the sun at noon. However, when railway travel began, this created a nightmarish problem for trains traveling between cities. As such, Britain soon standardized its time across the island; however, being a small island, the entirety fit easily within one time zone. The United States, on the other hand, had a much bigger problem on its hands. In 1883, the U.S. standardized the nation into four time zones, covering the states which existed at the time, although it took a while before the changes were completely implemented. Nevertheless, a convention the following year in Paris set out to establish standard time zones worldwide, each one an interval of an hour offset from the last.
So how did Sri Lanka end up with a time zone halfway between the standard? Sri Lanka did start out offset by a half hour in the 1880’s (UTC+05:30), probably due to its longitudinal position halfway between the two standards. Since India began using the same offset, and both nations were colonized by the British at the time, it probably seemed reasonable to keep them on the same standard. While Sri Lanka briefly disposed of the offset during World War II (UTC+06:00), it actually pushed the clock forward further a little later into the war (UTC+06:30), probably to make additional use of daylight hours.
When World War II ended, Sri Lanka reverted back to Indian Standard Time (UTC+05:30), which remained the standard for the entirety of India even after the end of British rule, despite the size of the country. As such, Sri Lanka remained on the offset until 1996, when due to power shortages, the government decided to once again push the clock forward an hour (UTC+06:30) to take advantage of daylight hours. However, a few months later, the government decided to change the offset again, this time doing away with it completely (UTC+06:00).
This created a bit of an odd problem for the small island due to the political situation at the time. The areas controlled by the Liberation Tigers of Tamil Eelam (LTTE) did not follow either of the time standard changes in 1996, remaining on Indian Standard Time and resulting in a time schism within the country itself.
Finally, in 2006, Sri Lanka decided to once again adopt Indian Standard Time, pushing their clocks a half hour back. This change has remained in place until the present day.