DST Testing
Date and time are important parameters for any software. In case the software product/project is used across the world, it is necessary to display the data in the respective local time zone. This would be more effective for any business and is less likely to cut off the administration overhead. Date time internationalization is a very important concept which should be implemented with thoughtfulness; otherwise, it could lead to significant consequences in the software product. When coming into testing, I would say it is a bit tricky to test the date time localization and every tester may be confused on how to test the software end to end without leaving any loopholes. Did you face this situation?
In this article, I wanted to share my experience with date time internationalization testing with the tips and techniques which I have learned along the way. To start with, before testing any new concepts, it is always essential to do some groundwork. For this testing, we need to be very clear about the time zone concepts and DST changes.
In the coming section, we will look at the basic concepts that need to be prepared and the settings which should be covered during testing.
What is standard time?
Standard time is a local time in a country or region when daylight saving time is not in use.
What is UTC?
This was called Greenwich Mean Time (GMT) but it is now referred to as Coordinated Universal Time Zone (UTC). Any country, to obtain the local time zone, will subtract or add the time from UTC. (Eg: IST (UTC + 5.30)).
What is DST and which countries observe DST?
Daylight savings -- is this a new word?? (Might be for the fresher tester). Many countries in the world adjust their clock twice a year to make better use of daylight. They turn their clock one hour forward during the summer and backward during the winter. In a nutshell, countries which are located near the equator will not observe daylight savings time. These countries have a longer period of daylight in the summer season. According to a few sources, observing daylight savings time saves energy.
What is date time format?
In simple words, representation of the date and time. There are different ways for the representations of date and time which can be viewed. During the testing, it is important to consider this as a primary data set.
What are regional settings?
The same as the date time format, we need to consider the regional settings. This setting will influence how the date/time and other types of data appear when you are applying these options. Every country has a different kind of regional setting set by Windows OS by default. If the software is tested in one regional setting and left untested for other settings it may lead to a loophole in the software.
The below-represented points need to be considered during daylight savings testing which most likely covers all the scenarios.
- UTC
- UTC + with Daylight saving time zone
- UTC + without Daylight saving time zone
- UTC - with Daylight saving time zone
- UTC - without Daylight saving time zone
Time Scenarios | Example Time Zone |
UTC | UTC (Coordinated Universal Time), UTC + 00:00 Dublin, Edinburgh, Lisbon, London |
UTC - with Daylight saving time zone | UTC -08:00 Pacific Time (US & Canada) |
UTC - without Daylight saving time zone | UTC - 07:00 Arizona |
UTC + with Daylight saving time zone | UTC + 01:00 Amsterdam, Berlin, Bern, Rome, Stockholm, Vienna |
UTC + without Daylight saving time zone | UTC + 05:30 Chennai. Kolkata, Mumbai, New Delhi |
In my opinion, if we consider the below DST changes in timezones for testing it would cover all the possible scenarios.
Daylight savings in Europe, US & Canada for example:
Following are the time notes that should be considered while doing testing in VM or local server to change the desired time to test different test flows.
- Hyper-V Time Synchronization Service, startup set to "Manual"
- Windows Time Service, startup set to "Manual"
- Time settings set to actively synchronize with "time.windows.com" need to be disabled
I hope you find the article useful and that it gives you an overview of how to do the DST testing.
Happy Testing!!!