A current time and a current Gregorian date are converted into an epoch
time stamp. A number of seconds that have elapsed since a predetermined
date up until the current year is determined. A number of seconds that
have elapsed since the beginning of the current year up until the current
month is determined based on whether the current year is a leap year. In
addition, a number of seconds that have elapsed since the beginning of
the current month up until the current day is calculated, as is a number
of seconds that have elapsed during the current day. All of these values
are summed to obtain a converted time. Finally, it is determined whether
Daylight Savings Time is in effect, and when Daylight Savings Time is not
in effect, 3600 seconds are added to the converted time.