summaryrefslogtreecommitdiff
path: root/pr/src/misc/prtime.c
diff options
context:
space:
mode:
Diffstat (limited to 'pr/src/misc/prtime.c')
-rw-r--r--pr/src/misc/prtime.c46
1 files changed, 23 insertions, 23 deletions
diff --git a/pr/src/misc/prtime.c b/pr/src/misc/prtime.c
index 0aa6e46c..a107d1d4 100644
--- a/pr/src/misc/prtime.c
+++ b/pr/src/misc/prtime.c
@@ -774,7 +774,7 @@ PR_IMPLEMENT(PRTimeParameters)
PR_USPacificTimeParameters(const PRExplodedTime *gmt)
{
PRTimeParameters retVal;
- PRExplodedTime std;
+ PRExplodedTime st;
/*
* Based on geographic location and GMT, figure out offset of
@@ -789,32 +789,32 @@ PR_USPacificTimeParameters(const PRExplodedTime *gmt)
* is ignored.
*/
- std.tm_usec = gmt->tm_usec;
- std.tm_sec = gmt->tm_sec;
- std.tm_min = gmt->tm_min;
- std.tm_hour = gmt->tm_hour;
- std.tm_mday = gmt->tm_mday;
- std.tm_month = gmt->tm_month;
- std.tm_year = gmt->tm_year;
- std.tm_wday = gmt->tm_wday;
- std.tm_yday = gmt->tm_yday;
+ st.tm_usec = gmt->tm_usec;
+ st.tm_sec = gmt->tm_sec;
+ st.tm_min = gmt->tm_min;
+ st.tm_hour = gmt->tm_hour;
+ st.tm_mday = gmt->tm_mday;
+ st.tm_month = gmt->tm_month;
+ st.tm_year = gmt->tm_year;
+ st.tm_wday = gmt->tm_wday;
+ st.tm_yday = gmt->tm_yday;
/* Apply the offset to GMT to obtain the local standard time */
- ApplySecOffset(&std, retVal.tp_gmt_offset);
+ ApplySecOffset(&st, retVal.tp_gmt_offset);
/*
* Apply the rules on standard time or GMT to obtain daylight saving
* time offset. In this implementation, we use the US DST rule.
*/
- if (std.tm_month < 3) {
+ if (st.tm_month < 3) {
retVal.tp_dst_offset = 0L;
- } else if (std.tm_month == 3) {
- if (std.tm_wday == 0) {
+ } else if (st.tm_month == 3) {
+ if (st.tm_wday == 0) {
/* A Sunday */
- if (std.tm_mday <= 7) {
+ if (st.tm_mday <= 7) {
/* First Sunday */
/* 01:59:59 PST -> 03:00:00 PDT */
- if (std.tm_hour < 2) {
+ if (st.tm_hour < 2) {
retVal.tp_dst_offset = 0L;
} else {
retVal.tp_dst_offset = 3600L;
@@ -825,7 +825,7 @@ PR_USPacificTimeParameters(const PRExplodedTime *gmt)
}
} else {
/* Not a Sunday. See if before first Sunday or after */
- if (std.tm_wday + 1 <= std.tm_mday) {
+ if (st.tm_wday + 1 <= st.tm_mday) {
/* After first Sunday */
retVal.tp_dst_offset = 3600L;
} else {
@@ -833,14 +833,14 @@ PR_USPacificTimeParameters(const PRExplodedTime *gmt)
retVal.tp_dst_offset = 0L;
}
}
- } else if (std.tm_month < 9) {
+ } else if (st.tm_month < 9) {
retVal.tp_dst_offset = 3600L;
- } else if (std.tm_month == 9) {
- if (std.tm_wday == 0) {
- if (31 - std.tm_mday < 7) {
+ } else if (st.tm_month == 9) {
+ if (st.tm_wday == 0) {
+ if (31 - st.tm_mday < 7) {
/* Last Sunday */
/* 01:59:59 PDT -> 01:00:00 PST */
- if (std.tm_hour < 1) {
+ if (st.tm_hour < 1) {
retVal.tp_dst_offset = 3600L;
} else {
retVal.tp_dst_offset = 0L;
@@ -851,7 +851,7 @@ PR_USPacificTimeParameters(const PRExplodedTime *gmt)
}
} else {
/* See if before or after last Sunday */
- if (7 - std.tm_wday <= 31 - std.tm_mday) {
+ if (7 - st.tm_wday <= 31 - st.tm_mday) {
/* before last Sunday */
retVal.tp_dst_offset = 3600L;
} else {