2019 IEEE/ACM 16th International Conference on Mining Software Repositories (MSR)

Impacts of Daylight Saving Timeon Software Development
Junichi Hayashi, Yoshiki Higo, Shinsuke Matsumoto and Shinji Kusumoto
Graduate School of Information Science and Technology, Osaka University, Japan{j-hayasi, higo, shinsuke, kusumoto}@ist.osaka-u.ac.jp

Abstract—Daylight saving time (DST) is observed in many
countries and regions. DST is not considered on some softwaresystems at the beginning of their developments, for example,
software systems developed in regions where DST is not observed.
However, such systems may have to consider DST at the requestsof their users. Before now, there has been no study about the
impacts of DST on software development. In this paper, westudy the impacts of DST on software development by mining
the repositories on GitHub. We analyze the date when the code
related to DST is changed, and we analyze the regions where thedevelopers applied the changes live. Furthermore, we classify thechanges into some patterns.
Index Terms—Daylight Saving Time, Code Change Analysis,
Geographical Analysis

Modiﬁcations related to DST do not depend on programming languages. Software projects of any programming
languages have DST modiﬁcations.
• We found some change patterns in DST modiﬁcations inJava projects.
•

II. DAYLIGHT S AVING T IME
Daylight saving time (DST) is a seasonal time change
measure where clocks are set ahead of standard time during
part of the year, usually by 1 hour. As DST starts, the sun rises
and sets later, on the clock, than the day before. Today, about
40% of countries and regions use DST to make better use of
daylight and to conserve energy [5]. For example, most of theUnited States begin DST on the second Sunday in March andrevert to the standard time on the ﬁrst Sunday in November [6].

I. I NTRODUCTION
Many countries and regions observe daylight saving time (inshort, DST). DST is the practice of advancing clocks during
summer months, so that evening daylight lasts longer while
sacriﬁcing normal sunrise times. In 2018, there was muchcontroversy over whether to introduce DST before the 2020
Tokyo Olympic games in Japan because introducing DST can
reduce physical burden for athletes by playing their games inthe early morning. However, as a result, Japan ended up not
introducing DST because the Japanese business community
strongly opposed introducing DST. The community loudly
said that introducing DST requires enormous modiﬁcations
on software systems used in Japanese society and it is notrealistic to ﬁnish such modiﬁcations before the 2020 Tokyo
Olympic games.
The controversy gave the authors an idea that treating DST
in software systems may be a difﬁcult task. We also consider
that there may be some coding patterns for practically treating
DST in software systems. In other words, the authors thinkthat DST probably has some impacts on software development
and maintenance. The authors found several research studies
from a sociological perspective [1]–[4] while we were notable to ﬁnd any research studies from a software engineering
perspective.
In this research, we investigated source code changes due
to DST by using Git repositories of OSS projects. The main
contributions of this paper are as follows.

A. Impacts on Society
Introducing DST has the following impacts on our society.
• DST makes an energetic economy and society [1].
• DST reduces the peak demand for electricity [2].
• DST increases the number of trafﬁc accidents [3].
• DST increases the risks of acute cardiac infarction [4].
As shown in the above, there are several research studies
from a sociological perspective.
B. Impacts on Software Systems
There are multiple ways to treat date and time in the sourcecode. For example, the standard library of Java includes classes
java.time.ZonedDateTime and java.time.LocalDateTime.
The former one considers time zone, but the latter one doesnot. If a developer does not know the differences between
the two classes, he/she may induce bugs in the source code.
The authors consider that introducing DST also has some
impacts on software development and maintenance. However,
we did not ﬁnd any research studies on DST from a software
engineering perspective. In this research, we investigate theimpacts of DST on software systems by using Git repositories
of OSS projects. Hereafter, we call code changes related to
DST DST-changes.
III. R ESEARCH Q UESTIONS
We set up the following research questions in our research.
RQ1. How many projects conduct DST-changes?
RQ2. What kinds of software systems include DST-changes?
RQ3. When are DST-changes conducted?

This is the ﬁrst investigation on DST from a software
engineering perspective.
• We found that more mature projects have more modiﬁcations related to DST.
•

2574-3864/19/$31.00 ©2019 IEEE
DOI 10.1109/MSR.2019.00076

502

projects acquire new users, that users report bugs related to
DST, and that users need the treatments for DST, as time
passed.
4) Answer to RQ: 969 projects are conducted DST-changes.

5DWLRRI'67UHSRVLWRULHV





B. RQ2. What kinds of software systems include DSTchanges?



1) Methodology: We checked the following two attributesof each DST-repository:• the most used language in the repository, and• the application domain of the repository.
The most used language in each repository is retrieved using a
GitHub API. If multiple languages are used in a given repository, the most used language in the repository is regarded as
the programming language of the repository. The application
domains are deﬁned by Zapponi et al. as follows [8]:• Application software: systems that provide functionalities
to end-users, like browsers and text editors.
• System software: systems that provide services and infrastructure to other systems, like operating systems,
middleware, servers and databases.
• Web libraries and frameworks.
• Non-web libraries and frameworks.
• Software tools: systems that support software development tasks, like IDEs package managers, and compilers.
• Documentation: repositories with documentation, tutorials, source code examples, and so on.
We classiﬁed them into these domains manually by reading
the description and a README ﬁle of the DST-repositories.
2) Experimental Results: The left part of Table I shows
the top 10 languages used in the DST-repositories. For thecomparisons with all repositories on GitHub, the right part ofTable I represents the ranking of the most used languages for
all repositories in GitHub. This ranking is reported by GitHut
project [9]. In Table I, most of the languages listed in theleft part are listed in the right part. The proportions of eachlanguage are almost the same as well. Thus, the tendenciesof the languages used in both the DST-repositories and all
repositories on GitHub are very similar.
Figure 2 shows the distribution of the application domainsof the repositories. The upper bar in the ﬁgure shows the
distribution of the DST-repositories, and the lower bar shows
the distribution of the top 2,500 starred repositories on GitHub
          Fig. 1. Creation year of DST-repositories.

RQ4. Which countries and regions do developers of DSTchanges live in?
RQ5. How is code changed in DST-changes?
The following subsections of this section describe themethodology, results and discussion for research questions
above.
A. RQ1. How many projects conduct DST-changes?
1) Methodology: We focus on pull requests (in short, PRs)
in Git repositories on GitHub in order to analyze DST-changes
conducted in OSS projects. The PRs that we focused on satisfy
the following both two conditions:• PRs that are related to DST, and• PRs that have already been merged.
We search for such PRs by keywords which mean DST, “daylight saving” and “summer time”. These words are used in the
United States and the United Kingdom. The keyword “daylightsaving” is chosen to correct the orthographical variants of DST(i.e., “daylight saving time” or “daylight savings time”) at atime. We call repositories including DST-related PRs DSTrepositories.
The creation date of a repository is an attribute of thesoftware project. The creation date of each DST-repository
was retrieved by using a REST API provided by GitHub.
2) Experimental Results: There are 1,181 DST-related PRs
in 969 projects.
Figure 1 shows the distribution of years when the DSTrepositories were created. The Y-axis of the ﬁgure means
the ratio of the DST-repositories created in the year to all
repositories created in the same year. The number of all
repositories which were created in each year since 2011 wasaggregated using the data on GH Archive1 . Since GH Archive
does not have data between 2008 and 2010, the number of all
repositories which were created in each year until 2010 was
extrapolated based on the article [7] of GitHub’s blog.
Many DST-repositories were created in 2008. The ratio of
the DST-repositories decreases as time passed. The absolutevalue of the ratio of the DST-repositories gets decreased year
by year.
3) Discussion: The experimental results show that older
projects have more DST-changes than the projects started
recently. We consider the reasons for the results are that OSS

TABLE I
T OP -10 L ANGUAGES U SED IN DST- REPOSITORIES .
DST-repositories
All repositories [9]Proportion (%)
Language
Proportion (%) Language
Python
20
JavaScript
21
Python
15
JavaScript
16
Java
10
Java
11
8
Ruby
6 PHP
8
C++
6 C++
PHP
6 C#
6
4
C
5 Shell
4
HTML
4 Go
C#
4 Ruby4
4Go
2 C

1 https://www.gharchive.org/

503



:HEOLEUDULHVDQGIUDPHZRUNV'RFXPHQWDWLRQ

6RIWZDUHWRROV

6\VWHPVRIWZDUH










Fig. 2. Application domains of DST-repositories.

according to Borges et al. [8]. Application software and Nonweb libraries and frameworks of the DST-repositories are morethan those of the top 2,500 starred repositories.
3) Discussion: The experimental results show that the rateof each language that DST-changes conducted are almost thesame as the rate of each language in all GitHub projects.
Consequently, we consider that DST-changes are necessary for
any languages.
4) Answer to RQ: Software systems of Application softwareand Non-web libraries and frameworks include more than onesof other domains.













0HUJHG

1RQZHEOLEUDULHVDQGIUDPHZRUNV0HUJHG$SSOLFDWLRQVRIWZDUH





&UHDWHG

0HUJHG&UHDWHG

0HUJHG&UHDWHG







&UHDWHG







0HUJHG







&UHDWHG








0HUJHG







&UHDWHG

0HUJHG &UHDWHG

0HUJHG

7RSVWDUUHG

7KHUHSRVLWRU\LQFOXGLQJD35
ZDVFUHDWHGLQ&UHDWHG



1XPEHURI'67UHODWHG35V'67UHODWHG





<HDUZKHQ'67UHODWHG35VZHUHFUHDWHGPHUJHG

Fig. 3. The number of DST-related PRs which were created in every year.
The parts of each bar are painted in different colors to distinguish the year
when the repository including the PR was created.

1XPEHURI'67UHODWHG35VC. RQ3. When are DST-changes conducted?
1) Methodology: The creation date of a DST-related PRmeans when a developer conducted DST-changes on sourcecode. The date merged the PR means when developers adopted
the changes. We retrieved those dates by the APIs of GitHub.
2) Experimental Results: Figure 3 shows the number ofthe DST-related PRs created and merged in every year. The
parts of each bar in the ﬁgure are painted in different colors to
distinguish the year when the repository including the PR was
created. Figure 4 shows the number of the DST-related PRs
created and merged on every month. Note that each number
in Figure 4 is a total of the repositories created or merged on
the same months between 2011 and 2018.
The number of created PRs increases year by year as shownin Figure 3. We can see that the DST-related PRs were createdand merged in summer more than in other seasons.
3) Discussion: The experimental results show there are twotendencies in DST-changes.
• More DST-changes are conducted in recent years.
• More DST-changes are conducted during March to October, which is almost the same as the period of DST.
We consider the reason for the ﬁrst tendency is that new
repositories treating DST are created every year. In such
systems, DST-changes are conducted every year after therepository creation. The reason for the second tendency may
be that new bugs are found in operating software systems with
DST mode.
The results also show that there are repositories conducted
DST-changes constantly every year in spite of the years when

&UHDWHG
0HUJHG







-DQ )HE 0DU $SU 0D\ -XQ-XO $XJ 6HS 2FW 1RY 'HFFig. 4. The number of DST-related PRs which were created every month
between 2011 and 2018.

they were created. This is another reason for the second tendency and also leads to the reason why more DST-repositories
were created formerly than recently.
4) Answer to RQ: More DST-changes are conducted during
the period of DST than other.
D. RQ4. Which countries and regions do developers of DSTchanges live in?
1) Methodology: We identiﬁed the country or region ofeach developer that conducted some DST-changes, based on
the top-level domains (TLDs) of their public email addresses.
Although every TLD does not indicate speciﬁc regions, weinvestigated the email address with country code TLDs thatindicate the residential regions of the developer, because suchregions can be identiﬁed correctly and automatically.
2) Experimental Results: We found that 1,210 developers
modiﬁed some source code in the DST-related PRs and we
identiﬁed the residential regions where 274 developers out ofthem live. Figure 5 shows the top 20 residential regions. In theﬁgure, the regions highlighted in green are observing DST atpresent. The regions highlighted in yellow has observed DST
before, however, they do not observe it at present. The region
highlighted in red has never observed DST.

504





˛ KDVREVHUYHGEHIRUH

(8

&]HFK

%UD]LO$XVWUDOLD

1RUZD\&RFRV,VODQGV,WDO\'HQPDUN

6ZHGHQ%HOJLXP

0RQWHQHJUR

5XVVLD)LQODQG&DQDGD&RORPELD

˛ REVHUYHGDWSUHVHQW

1HWKHUODQGV

6ZLW]HUODQG

8.

)UDQFH

*HUPDQ\

1XPEHURIGHYHORSHUV― public static DateTimeFormatter getDateTimeFormatterForDataset(TimeSpec
timeSpec) {+ public static DateTimeFormatter getDateTimeFormatterForDataset(TimeSpec
timeSpec, DateTimeZone zone) {String pattern = null;
TimeUnit unit = timeSpec.getDataGranularity().getUnit();switch (unit) {case DAYS:
pattern = DAY_FORMAT;
break;
case MINUTES:
pattern = MINUTE_FORMAT;
break;
case HOURS:
default:
pattern = HOUR_FORMAT;
break;}― DateTimeFormatter dateTimeFormatter = DateTimeFormat.forPattern(pattern);+ DateTimeFormatter dateTimeFormatter =DateTimeFormat.forPattern(pattern).withZone(zone);return dateTimeFormatter;}˛ KDVQHYHUREVHUYHG

Fig. 5. Top 20 residential regions of the developers that modiﬁed some sourcecode in DST-related PRs.

As shown in the ﬁgure, most of the developers live inthe regions observing DST. In other words, most of DSTchanges were conducted by the developers living in the regions
observing DST.
3) Discussion: The experimental results show that DSTchanges are conducted by developers who live in DST countries or regions. The fact means that developers who livein non-DST countries or regions tend not to conduct DSTchanges. Software systems used in non-DST countries andregions do not count for DST, which may be a reason forthis tendency.
4) Answer to RQ: Most of developers conducting DSTchanges live in countries and regions that observe DST.

Fig. 6. Example change adding the process that handles time zones, for
APACHE / INCUBATOR - PINOT 2 .
private Date getEndDate(Product prod, Date startTime) {int interval = maxDevLifeDays;
String prodExp = prod.getAttributeValue("expires_after");if (prodExp != null && Integer.parseInt(prodExp) < maxDevLifeDays) {interval = Integer.parseInt(prodExp);}― return 1000 * 60 * 60 * 24 * interval;+ Calendar cal = Calendar.getInstance();+ cal.setTime(startTime);+ cal.add(Calendar.DAY_OF_YEAR, interval);++ return cal.getTime();}Fig. 7. Example change using java.util.Calendar class to calculate date andtime, for CANDLEPIN / CANDLEPIN3 .

E. RQ5. How is code changed in DST-changes?
may be another reason for DST-changes. The code does notconsider DST may not be exposed before DST starts.
4) Answer to RQ: There are changes that classes and APIs
using management and calculation of date and time make more
appropriate.

1) Methodology: We investigated code changes in the DSTrelated PRs to identify common ﬁxing patterns in the changes.
The changes are conducted in Java repositories because we areused to reading Java code.
2) Experimental Results: We found the following patternsof DST-changes from the DST-related Java repositories:• adding the process that handles time zones, and• using java.util.Calendar class for the calculation of date
and time.
The former change is applied mainly when different times
are given according to runtime environments because the timezone was not considered before the change. The latter change
is that the calculation of date and time depends on classes ofthe standard library of Java, instead of using constant values
without consideration of DST, e.g., a day is equal to 24×60×
60 = 86,400 seconds. Figures 6 and 7 are practical patternsof the changes. In the ﬁgures, the lines added in the change
are highlighted in green and the lines removed in the change
are highlighted in red.
3) Discussion: The experimental results show that there aremany projects that had insufﬁcient treatments for DST andthen they had received DST-changes. This may be because
testing code related to DST is difﬁcult in non-DST season.
The existences of multiple ways for treating date and time

IV. C ONCLUSION
In this research, we investigated the impacts of daylightsaving time on software systems. Especially, we focused onfeatures of repositories where changes related to daylightsaving time were conducted, date and time of such changes,
and residence of developers who conducted such changes.
As a result, we found that more changes related to daylightsaving time are conducted in recent years and most of suchchanges are conducted in the period of daylight saving time.
We also investigated what kinds of code had been modiﬁed
due to daylight saving time, and we found that softwaresystems occasionally get releases even they include insufﬁcient
treatment of daylight saving time. In the near future, we aregoing to investigate faults that are related to daylight saving
time. We are also going to conduct investigations of codechanges for other languages than Java.
ACKNOWLEDGMENT
This work was supported by MEXT/JSPS KAKENHI
17H01725 and 18H03222.

2 https://github.com/apache/incubator-pinot/pull/992/ﬁles
3 https://github.com/candlepin/candlepin/pull/1082/ﬁles505

R EFERENCES[1] M. B. Aries and G. R. Newsham, “Effect of daylight saving time onlighting energy use: A literature review,” Energy Policy, vol. 36, no. 6,
pp. 1858 – 1866, 2008.
[2] P. Hancevic and D. Margulis, “Daylight saving time and energy consumption: The case of Argentina,” University Library of Munich, Germany,
MPRA Paper 80481, 2016.
[3] T. Monk, “Trafﬁc accident increases as a possible indicant of desynchronosis,” Chronobiologia, vol. 7, no. 4, pp. 527–529, 1980.
[4] M. R. Jiddou, M. Pica, J. Boura, L. Qu, and B. A. Franklin, “Incidence of
myocardial infarction with shifts to and from daylight savings time,” The
American Journal of Cardiology, vol. 111, no. 5, pp. 631 – 635, 2013.
[5] S. Thorsen, “Daylight Saving Time – DST – Summer Time.” [Online].
Available: https://www.timeanddate.com/time/dst/[6] M. Fitzpatrick, Daylight Saving Time. Connecticut General Assembly,
Dec 2017.
[7] B. Doll, “10 Million Repositories,” Dec 2013. [Online]. Available:
https://github.blog/2013-12-23-10-million-repositories/[8] H. Borges, A. Hora, and M. T. Valente, “Understanding the factors that
impact the popularity of github repositories,” in 2016 IEEE International
Conference on Software Maintenance and Evolution (ICSME), Oct 2016,
pp. 334–344.
[9] C. Zapponi, “Github Language Stats,” Oct 2018. [Online]. Available:
https://madnight.github.io/githut/#/pushes/2018/3

506